node-flat-camel
camelCase object flattener
Flattens objects, arrays by converting it's keys into a camelCase format.
Installation
npm install flat-camel
How it works:
Object
const flattener = ; const objectToFormat = hello: people: how: are: you: 'good' ; flattener; // result helloPeopleHowAreYou: 'good';
Array
const flattener = ; const arrayToFormat = hello: people: how: are: you: 'good' 'hello' 1 true; flattener; // result helloPeopleHowAreYou: 'good' 'hello' 1 true;
Tests
Requirements:
- npm
- make
Run make deps
once and then make test
to launch the test suite.
License
The MIT License MIT