🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

change-case

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

change-case - npm Package Compare versions

Comparing version

to
0.0.5

4

index.js

@@ -27,4 +27,4 @@ var acceptString = function (fn) {

e.titleCase = e.title = acceptString(function (str, isSignificant) {
return splitWords(str).map(function (word) {
if (!isSignificant && (word.length < 3 || ~e.insignificantWords.indexOf(word))) {
return splitWords(str).map(function (word, index) {
if (index && !isSignificant && (word.length < 3 || ~e.insignificantWords.indexOf(word))) {
return word;

@@ -31,0 +31,0 @@ }

{
"name": "change-case",
"version": "0.0.4",
"version": "0.0.5",
"description": "Convert strings between camelCase, PascalCase, Title Case, snake_case, etc",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,2 +15,3 @@ /* global describe, it */

it('should convert to title case', function () {
assert.equal(changeCase.titleCase('a-simple-test'), 'A Simple Test');
assert.equal(changeCase.titleCase('this is a test'), 'This is a Test');

@@ -34,2 +35,3 @@ assert.equal(changeCase.titleCase('this_is_a_test'), 'This is a Test');

assert.equal(changeCase.pascalCase('Test-String'), 'TestString');
assert.equal(changeCase.pascalCase('a-test-again'), 'ATestAgain');
});

@@ -36,0 +38,0 @@