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

sentence-case

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentence-case - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

vendor/trailing-digit-regexp.js

1

build.js

@@ -22,1 +22,2 @@ var fs = require('fs');

write('camel-case-regexp.js', new XRegExp('(\\p{Ll})([\\p{Lu}\\p{N}])', 'g'));
write('trailing-digit-regexp.js', new XRegExp('(\\p{N})(\\p{^N})', 'g'));

2

package.json
{
"name": "sentence-case",
"version": "1.0.3",
"version": "1.1.0",
"description": "Sentence case a string",

@@ -5,0 +5,0 @@ "main": "sentence-case.js",

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

var NON_WORD_REGEXP = require('./vendor/non-word-regexp.js');
var CAMEL_CASE_REGEXP = require('./vendor/camel-case-regexp.js');
var NON_WORD_REGEXP = require('./vendor/non-word-regexp.js');
var CAMEL_CASE_REGEXP = require('./vendor/camel-case-regexp.js');
var TRAILING_DIGIT_REGEXP = require('./vendor/trailing-digit-regexp.js');

@@ -18,2 +19,4 @@ /**

.replace(CAMEL_CASE_REGEXP, '$1 $2')
// Add a space after any digits.
.replace(TRAILING_DIGIT_REGEXP, '$1 $2')
// Remove all non-word characters and replace with a single space.

@@ -20,0 +23,0 @@ .replace(NON_WORD_REGEXP, ' ')

@@ -45,3 +45,6 @@ /* global describe, it */

['Beyoncé Knowles', 'beyoncé knowles'],
['Iñtërnâtiônàlizætiøn', 'iñtërnâtiônàlizætiøn']
['Iñtërnâtiônàlizætiøn', 'iñtërnâtiônàlizætiøn'],
// Number string input.
['something2014other', 'something 2014 other']
];

@@ -48,0 +51,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