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.
npm install sentence-case --save
var sentenceCase = require('sentence-case');
sentenceCase(null); //=> ""
sentenceCase('string'); //=> "string"
sentenceCase('dot.case'); //=> "dot case"
sentenceCase('camelCase'); //=> "camel case"
sentenceCase('Beyoncé Knowles'); //=> "beyoncé knowles"
MIT