case-anything
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -23,3 +23,3 @@ 'use strict'; | ||
var target = string.trim(); | ||
var parts = target.includes(' ') ? target.split(' ') : splitOnSpecialChars(target); | ||
var parts = target.includes(' ') ? target.split(' ').filter(Boolean) : splitOnSpecialChars(target); | ||
return noSpecialChars ? parts.map(function (part) { return part.replace(/[^a-zA-Z0-9]/g, ''); }) : parts; | ||
@@ -26,0 +26,0 @@ } |
@@ -19,3 +19,3 @@ /** | ||
var target = string.trim(); | ||
var parts = target.includes(' ') ? target.split(' ') : splitOnSpecialChars(target); | ||
var parts = target.includes(' ') ? target.split(' ').filter(Boolean) : splitOnSpecialChars(target); | ||
return noSpecialChars ? parts.map(function (part) { return part.replace(/[^a-zA-Z0-9]/g, ''); }) : parts; | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "case-anything", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"sideEffects": false, | ||
@@ -19,3 +19,3 @@ "description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)", | ||
"@typescript-eslint/parser": "^2.23.0", | ||
"ava": "^2.4.0", | ||
"ava": "^3.5.0", | ||
"eslint": "^6.8.0", | ||
@@ -26,2 +26,3 @@ "eslint-config-prettier": "^6.10.0", | ||
"rollup-plugin-typescript2": "^0.25.3", | ||
"ts-node": "^8.6.2", | ||
"typescript": "^3.8.3" | ||
@@ -57,3 +58,7 @@ }, | ||
}, | ||
"homepage": "https://github.com/mesqueeb/case-anything#readme" | ||
"homepage": "https://github.com/mesqueeb/case-anything#readme", | ||
"ava": { | ||
"extensions": ["ts"], | ||
"require": ["ts-node/register"] | ||
} | ||
} |
@@ -96,2 +96,4 @@ # Case anything 🐫 | ||
Also note, that multiple sequential spaces are treated as one space. | ||
### When special alphabet is involved | ||
@@ -98,0 +100,0 @@ |
@@ -19,3 +19,3 @@ /** | ||
const target = string.trim() | ||
const parts = target.includes(' ') ? target.split(' ') : splitOnSpecialChars(target) | ||
const parts = target.includes(' ') ? target.split(' ').filter(Boolean) : splitOnSpecialChars(target) | ||
return noSpecialChars ? parts.map(part => part.replace(/[^a-zA-Z0-9]/g, '')) : parts | ||
@@ -22,0 +22,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
32670
771
130
10