npm

Need private packages and team management tools?Check out npm Orgs. »

@atomic-app/snakecase-keys

1.1.0 • Public • Published

snakecase-keys Build Status

Convert an object's keys to snake case

Note: This is a browser-friendly fork of bendrucker/snakecase-keys.

Install

$ npm install --save snakecase-keys

Usage

var snakeCaseKeys = require('snakecase-keys')
 
snakeCaseKeys({fooBar: 'baz'})
//=> {foo_bar: 'baz'}
 
snakeCaseKeys({'foo-bar': true, nested: {fooBaz: 'bar'}});
//=> {foo_bar: true, nested: {foo_baz: 'bar'}}

API

snakeCaseKeys(obj) -> object

obj

Required
Type: object

An object to transform into snake case (keys only).

License

MIT © Ben Drucker

install

npm i @atomic-app/snakecase-keys

Downloadsweekly downloads

25

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability