"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/decamelize/readme.md" (25 Nov 2016, 781 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

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