Update docs

This commit is contained in:
Alan Grainger
2024-11-11 19:34:49 +01:00
parent e17137d1a8
commit 6608d8ca5b
4 changed files with 14 additions and 11 deletions
+4 -1
View File
@@ -9,7 +9,7 @@ try {
} catch (e) { }
/**
* Get a configuration option using dotted notation.
* Get a configuration option fron config.json using dotted notation.
*
* @param path
* @param [defaultOption] - Specify a default option to return if no configuation value is found
@@ -39,6 +39,9 @@ export function getSize (req: Request) {
return req.query?.size === 'thumbnail' ? ImageSize.thumbnail : ImageSize.original
}
/**
* Force a value to be a string
*/
export function toString (value: unknown) {
return typeof value === 'string' ? value : ''
}