const camelcaseKeys = require('camelcase-keys');
At top level, array members are turned into array elements.
(a = [{test_one: 1}]).test_two = {}; a;
// [ { test_one: 1 }, test_two: {} ]
camelcaseKeys(a);
// [ { testOne: 1 }, {} ]
At lower levels, array members are lost.
(o = {deep: [{test_one: 1}]}).deep.test_two = 1; o;
// { deep: [ { test_one: 1 }, test_two: 1 ] }
camelcaseKeys(o, {deep: true});
// { deep: [ { testOne: 1 } ] } }
I realize this is bad practice.
However, that this library mangles them and, in particular, inconsistently is I think problematic.
map-obj
already has the ability to handle Arrays.
Simply remove the extra function at module.exports
and export camelCaseConvert
directly.
Doesn't map-obj
already have a caching mechanism?
It seems a little redundant to me to have a caching layer in this package.
Maybe I'm missing something?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too