Package Exports
- keys-converter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (keys-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Snake Case to Camel Case
A module to convert object keys to camelcase.
npm i keys-converter or yarn add keys-converter
How to use it?
import { objectKeysToCamelCase } from "keys-converter";The function objectKeysToCamelCase receives an object
You can infer the return as argument so the result will be typed
Inference result and input
If you provide the input type, the function validate the arguments So if you provide result type the return will be typed
Warning
- The function does not remove first underscore for safely
example
If your object has an protected prop like _id It will keep it