node/tools/eslint/node_modules/decamelize
Michaël Zasso 2d441493a4 tools: update eslint to v1.10.3
PR-URL: https://github.com/nodejs/io.js/pull/2286
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-13 23:15:39 +01:00
..
index.js tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00
license tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00
package.json tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00
readme.md tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00

decamelize Build Status

Convert a camelized string into a lowercased one with a custom separator Example: unicornRainbowunicorn_rainbow

Install

$ npm install --save decamelize

Usage

const decamelize = require('decamelize');

decamelize('unicornRainbow');
//=> 'unicorn_rainbow'

decamelize('unicornRainbow', '-');
//=> 'unicorn-rainbow'

API

decamelize(input, [separator])

input

Type: string

separator

Type: string Default: _

See camelcase for the inverse.

License

MIT © Sindre Sorhus