Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capitalize

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capitalize - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc