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
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
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