capitalize
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -12,5 +12,5 @@ module.exports = function (string, preserve) { | ||
} | ||
return string.replace(/(^|[^a-zA-Z\u00C0-\u017F'])([a-zA-Z\u00C0-\u017F])/g, function (m) { | ||
return string.replace(/(^|[^a-zA-Z\u00C0-\u017F\u0400-\u04FF'])([a-zA-Z\u00C0-\u017F\u0400-\u04FF])/g, function (m) { | ||
return m.toUpperCase() | ||
}) | ||
} |
{ | ||
"name": "capitalize", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "capitalize the first letter of a string, or all words in a string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -72,2 +72,11 @@ # capitalize | ||
and thanks to [@6akcuk](https://github.com/grncdr/js-capitalize/pull/11) it can also capitalize cyrillic characters: | ||
```javascript | ||
test('Capitalize words with cyrillic characters', function (t) { | ||
t.plan(1) | ||
t.equal(capitalize.words('привет мир'), "Привет Мир") | ||
}) | ||
``` | ||
and thanks to [@ultraflynn](https://github.com/grncdr/js-capitalize/pull/3), capitalize properly handles quotes within the string: | ||
@@ -96,2 +105,3 @@ | ||
## Install | ||
@@ -98,0 +108,0 @@ |
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
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
5569
112