object-uncapitalize
v1.0.13
Published
Library to uncapitalize plain or complex objects and arrays
Downloads
63
Maintainers
Readme
object-uncapitalize
A quite simple Node.js library to uncapitalize plain or complex objects and arrays
Installation
$ npm install object-uncapitalize
Usage
const uncapitalizer = require('object-uncapitalize');
const objectWithCapitalKeys = {
CapitalKey: "test",
ComplexObjectCapitalKey: {
CapitalKey: "test"
}
ArrayWithCapital: [{CapitalKey:"test"}]
};
const objectUncapitalized = uncapitalizer(objectWithCapitalKeys);
console.log(objectUncapitalized);
/* Then you will get:
{
capitalKey: "test",
complexObjectCapitalKey: {
capitalKey: "test"
}
arrayWithCapital: [{capitalKey:"test"}]
}
*/