1
0

chore: programmatically convert filter values to snake_case

This commit is contained in:
kolaente
2022-02-06 20:48:37 +01:00
parent aac777e286
commit 204e94aa74
2 changed files with 29 additions and 24 deletions

View File

@ -45,6 +45,10 @@ export function objectToCamelCase(object) {
*/
export function objectToSnakeCase(object) {
if (object instanceof Date) {
return object.toISOString()
}
// When calling recursively, this can be called without being and object or array in which case we just return the value
if (typeof object !== 'object') {
return object