case-anything
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -6,3 +6,3 @@ // Latin-1 Supplement | ||
// [à-öø-ÿ] | ||
export const magicSplit = /^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g; | ||
export const magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g; | ||
export const spaceSplit = /\S+/g; | ||
@@ -49,3 +49,5 @@ /** | ||
if (keep) { | ||
part = part.normalize('NFD').replace(new RegExp(`[^a-zA-ZØßø0-9${keep.join('')}]`, 'g'), ''); | ||
part = part | ||
.normalize('NFD') | ||
.replace(new RegExp(`[^a-zA-ZØßø0-9${keep.join('')}]`, 'g'), ''); | ||
} | ||
@@ -88,3 +90,4 @@ if (!keep) { | ||
const firstLetterIndex = match ? match.index : 0; | ||
return string.slice(0, firstLetterIndex + 1).toUpperCase() + string.slice(firstLetterIndex + 1).toLowerCase(); | ||
return (string.slice(0, firstLetterIndex + 1).toUpperCase() + | ||
string.slice(firstLetterIndex + 1).toLowerCase()); | ||
} |
{ | ||
"name": "case-anything", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
32978
586