Skip to content

PatrickJS/sentence-case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentence Case

NPM version Build status Test coverage Gittip

Sentence case a string, with full support for non-ASCII characters. Also handles non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will come out as an empty string.

Installation

npm install sentence-case --save

Usage

var sentenceCase = require('sentence-case');

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

License

MIT

About

Sentence case a string in JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published