title-case
Advanced tools
Comparing version 1.1.2 to 2.0.0
{ | ||
"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) | ||
}) | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
2562
4
1
0
+ Addedno-case@^2.0.0
+ Addedno-case@2.3.2(transitive)
- Removedsentence-case@^1.1.1
- Removedsentence-case@1.1.3(transitive)