sentencecase-keys
v1.0.0
Published
Convert object keys to sentence case.
Downloads
4
Maintainers
Readme
sentencecase-keys
Convert object keys to sentence case.
Install
npm install sentencecase-keys
Usage
const sentencecaseKeys = require("sentencecase-keys");
sentencecaseKeys({ helloWorld: 1, "foo-bar": 2 });
//=> { "Hello world": 1, "Foo bar": 2 }
sentencecaseKeys([{ helloWorld: 1 }, { "hello-world": 1 }]);
//=> [{ "Hello world": 1 }, { "Hello world": 1 }]
API
sentencecaseKeys(object, options?)
object
Type: object or array of objects
The object to convert.
options
Type: object
Options to pass to map-obj.