decamelize (1.2.0)
Published 2026-02-24 13:55:11 +00:00 by atheaadmin
Installation
registry=npm install decamelize@1.2.0"decamelize": "1.2.0"About this package
decamelize 
Convert a camelized string into a lowercased one with a custom separator
Example:unicornRainbow→unicorn_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: _
Related
See camelcase for the inverse.
License
MIT © Sindre Sorhus
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| ava | * |
| xo | * |
Keywords
decamelize
decamelcase
camelcase
lowercase
case
dash
hyphen
string
str
text
convert
Details
Assets (1)
Versions (3)
View all
decamelize-1.2.0.tgz
1.7 KiB