Socket
Socket
Sign inDemoInstall

title-case

Package Overview
Dependencies
3
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 2.0.0

9

package.json
{
"name": "title-case",
"version": "1.1.2",
"version": "2.0.0",
"description": "Title case a string",

@@ -37,11 +37,10 @@ "main": "title-case.js",

"devDependencies": {
"istanbul": "^0.3.0",
"istanbul": "^0.4.3",
"mocha": "^2.2.1",
"pre-commit": "^1.0.6",
"standard": "^3.3.0"
"standard": "^7.1.2"
},
"dependencies": {
"sentence-case": "^1.1.1",
"no-case": "^2.0.0",
"upper-case": "^1.0.3"
}
}

@@ -0,3 +1,3 @@

var noCase = require('no-case')
var upperCase = require('upper-case')
var sentenceCase = require('sentence-case')

@@ -7,10 +7,10 @@ /**

*
* @param {String} string
* @param {String} [locale]
* @return {String}
* @param {string} value
* @param {string} [locale]
* @return {string}
*/
module.exports = function (str, locale) {
return sentenceCase(str, locale).replace(/^.| ./g, function (m) {
module.exports = function (value, locale) {
return noCase(value, locale).replace(/^.| ./g, function (m) {
return upperCase(m, locale)
})
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc