New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hm-change-case-object

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hm-change-case-object

Changes the case of all keys of an object

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

change-case-object

Build Status Dependency Status devDependency Status Coverage Status Code Climate

Changes the case of all object's keys,Array,String

Installation

npm install change-case-object Currently, only CommonJS environments are supported. (This means Node.js and browser with browserify or webpack)

Example

var changeCaseObject = require('change-case-object');

var myObject = {
  hello_world: 'hi',
};

var newObject = changeCaseObject.camelCase(myObject);
// {helloWorld: 'hi'}

Methods

All methods are available under the changeCaseObject object after the module has been required.

.camelCase

Conerts all object keys into camel case.
hello_world -> helloWorld

.snakeCase

Conerts all object keys into snake case.
helloWorld -> hello_world

.paramCase

Conerts all object keys into param case.
helloWorld -> hello-world

Shorthand methods are also available:

.camelCase -> .camel
.snakeCase -> .snake
.paramCase -> .param

Code Guideline

AirBnB ES5

License

MIT

Keywords

camel

FAQs

Package last updated on 11 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts