Blame view
node_modules/underscore.string/capitalize.js
276 Bytes
f7563de62
|
1 2 3 4 5 6 7 8 |
var makeString = require('./helper/makeString'); module.exports = function capitalize(str, lowercaseRest) { str = makeString(str); var remainingChars = !lowercaseRest ? str.slice(1) : str.slice(1).toLowerCase(); return str.charAt(0).toUpperCase() + remainingChars; }; |