stringcase
Convert string cases between camel case, pascal case, snake case etc...
Installation
npm install stringcase --save
Usage
'use strict'
const {
camelcase,
capitalcase,
constcase,
cramcase,
decapitalcase,
dotcase,
enumcase,
lowercase,
pascalcase,
pathcase,
sentencecase,
snakecase,
spacecase,
spinalcase,
titlecase,
trimcase,
uppercase
} = require('stringcase')
camelcase('foo_bar')
camelcase('FOO_BAR')
camelcase('fooBar')
camelcase('FooBar')
capitalcase('foo_bar')
capitalcase('FOO_BAR')
capitalcase('fooBar')
capitalcase('FooBar')
constcase('foo_bar')
constcase('FOO_BAR')
constcase('fooBar')
constcase('FooBar')
cramcase('foo_bar')
cramcase('FOO_BAR')
cramcase('fooBar')
cramcase('FooBar')
decapitalcase('foo_bar')
decapitalcase('FOO_BAR')
decapitalcase('fooBar')
decapitalcase('FooBar')
dotcase('foo_bar')
dotcase('FOO_BAR')
dotcase('fooBar')
dotcase('FooBar')
enumcase('foo_bar')
enumcase('FOO_BAR')
enumcase('fooBar')
enumcase('FooBar')
lowercase('foo_bar')
lowercase('FOO_BAR')
lowercase('fooBar')
lowercase('FooBar')
pascalcase('foo_bar')
pascalcase('FOO_BAR')
pascalcase('fooBar')
pascalcase('FooBar')
pathcase('foo_bar')
pathcase('FOO_BAR')
pathcase('fooBar')
pathcase('FooBar')
sentencecase('foo_bar')
sentencecase('FOO_BAR')
sentencecase('fooBar')
sentencecase('FooBar')
snakecase('foo_bar')
snakecase('FOO_BAR')
snakecase('fooBar')
snakecase('FooBar')
spacecase('foo_bar')
spacecase('FOO_BAR')
spacecase('fooBar')
spacecase('FooBar')
spinalcase('foo_bar')
spinalcase('FOO_BAR')
spinalcase('fooBar')
spinalcase('FooBar')
titlecase('foo_bar')
titlecase('FOO_BAR')
titlecase('fooBar')
titlecase('FooBar')
trimcase('foo_bar')
trimcase('FOO_BAR')
trimcase('fooBar')
trimcase('FooBar')
uppercase('foo_bar')
uppercase('FOO_BAR')
uppercase('fooBar')
uppercase('FooBar')
License
This software is released under the MIT License.