Skip to content
Transform a string to lower space cased in JavaScript
Branch: master
Clone or download
Latest commit 43ac059 Sep 8, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor Remove regexp repetition to avoid ReDoS (#18) Sep 8, 2017
.gitignore Update template and add replacement character Jan 31, 2015
.travis.yml chore: drop support for Node.js 0.10 (#12) Oct 31, 2016
LICENSE
README.md
build.js Remove regexp repetition to avoid ReDoS (#18) Sep 8, 2017
no-case.d.ts
no-case.js
package.json 2.3.2 Sep 8, 2017
test.js Allow empty replacement strings (#14) Jan 5, 2017

README.md

No Case

NPM version NPM downloads Build status Test coverage Greenkeeper badge

Transform a string to lower space cased. Optional locale and replacement character supported.

Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string.

Installation

npm install no-case --save

Usage

var noCase = require('no-case')

noCase(null)              //=> ""
noCase('string')          //=> "string"
noCase('dot.case')        //=> "dot case"
noCase('camelCase')       //=> "camel case"
noCase('Beyoncé Knowles') //=> "beyoncé knowles"

noCase('A STRING', 'tr') //=> "a strıng"

noCase('HELLO WORLD!', null, '_') //=> "hello_world"

Typings

Includes a TypeScript definition.

License

MIT

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.