format-title
v1.1.1
Published
Manipulate strings to give you the format you need: capitalized/non-capitalized per word or first word only etc...
Downloads
3
Maintainers
Readme
format-title
Manipulate strings to give you the title format you need: capitalized/non-capitalized per word etc...
API List
capWords(string)
capFirstWord(string)
capAll(string)
capCamelize(string)
lowWords(string)
lowFirstWord(string)
lowAll(string)
lowCamelize(string)
Example
Capitalize each word
var formatTitle = require('format-title');
console.log(formatTitle.capWords('this is my title'));
// > This Is My Title
Capitalize first word only
var formatTitle = require('format-title');
console.log(formatTitle.capFirstWord('this is my title'));
// > This is my title
Capitalize all (trivial)
var formatTitle = require('format-title');
console.log(formatTitle.capAll('this is my title'));
// > THIS IS MY TITLE