Deeply case any object/collection's keys
Caseize allow you to transform deeply any object or collection by casing keys. At this time only snakecase and camelcase are compatible. But feel free to add any case type you want and PR them to be available to the community.
- Casing to snakecase
- Casing to camelcase
import caseize from 'caseize'
const inputData = {
snake_case_key: 'value',
mixed_caseKey: 'value',
}
const outputData = caseize(inputData, 'camelcase')
// outputData === {
// snakeCaseKey: 'value',
// mixedCaseKey: 'value,
// }
$ npm i caseize
- abdalem
This project is licensed under the ISC License