search prototype with keyword filters

This commit is contained in:
vabene1111
2025-03-29 12:09:19 +01:00
parent aa1fa3a40e
commit ebd354bc8d
33 changed files with 116 additions and 15 deletions

View File

@@ -47,5 +47,13 @@ export function uploadRecipeImage(recipeId: number, file: File) {
}).finally(() => {
})
}
}
/**
* convert a string or an array of strings into an array of numbers
* useful for query parameter transformation
* @param param
*/
export function toNumberArray(param: string | string[]): number[]{
return Array.isArray(param) ? param.map(Number) : [parseInt(param)];
}