Sha256: 61d983275c5bf6721d1ce7fabfc448e91ed0e9575589ece776f75cfef900e68b

Contents?: true

Size: 276 Bytes

Versions: 19

Compression:

Stored size: 276 Bytes

Contents

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;
};

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ela-4.1.6 node_modules/underscore.string/capitalize.js
ela-4.1.5 node_modules/underscore.string/capitalize.js
ela-4.1.4 node_modules/underscore.string/capitalize.js
ela-4.1.3 node_modules/underscore.string/capitalize.js
ela-4.1.2 node_modules/underscore.string/capitalize.js
ela-4.1.1 node_modules/underscore.string/capitalize.js
ela-4.1.0 node_modules/underscore.string/capitalize.js
ela-4.0.0 node_modules/underscore.string/capitalize.js
ela-3.4.3 node_modules/underscore.string/capitalize.js
ela-3.4.2 node_modules/underscore.string/capitalize.js
ela-3.4.0 node_modules/underscore.string/capitalize.js
ela-3.3.1 node_modules/underscore.string/capitalize.js
ela-3.3.0 node_modules/underscore.string/capitalize.js
ela-3.2.0 node_modules/underscore.string/capitalize.js
ela-3.1.1 node_modules/underscore.string/capitalize.js
ela-3.1.0 node_modules/underscore.string/capitalize.js
ela-3.0.0 node_modules/underscore.string/capitalize.js
ela-2.0.0 node_modules/underscore.string/capitalize.js
ela-1.1.0 node_modules/underscore.string/capitalize.js