lamassu-server/lib/utils.js
Sérgio Salgado 45f722e724 feat: add emptyUnit bills table
feat: rework cash unit operations
fix: multiple fixes for the empty unit workflow
2023-06-07 14:27:43 +01:00

9 lines
302 B
JavaScript

const _ = require('lodash')
const camelize = obj =>
_.transform(obj, (acc, value, key, target) => {
const camelKey = _.isArray(target) ? key : _.camelCase(key.toString())
acc[camelKey] = _.isObject(value) && !(value instanceof Date) ? camelize(value) : value
})
module.exports = camelize