@directus/format-title
Advanced tools
Comparing version 10.1.2 to 11.0.0
@@ -248,19 +248,11 @@ // src/utils/decamelize.ts | ||
for (const special of special_case_default) { | ||
if (special.toLowerCase() === lowercaseStr) | ||
return special; | ||
if (special.toLowerCase() === lowercaseStr) return special; | ||
} | ||
if (acronyms_default.includes(uppercaseStr)) | ||
return uppercaseStr; | ||
if (index === 0) | ||
return str; | ||
if (index === words.length - 1) | ||
return str; | ||
if (str.length >= 4) | ||
return str; | ||
if (prepositions_default.includes(lowercaseStr)) | ||
return lowercaseStr; | ||
if (conjunctions_default.includes(lowercaseStr)) | ||
return lowercaseStr; | ||
if (articles_default.includes(lowercaseStr)) | ||
return lowercaseStr; | ||
if (acronyms_default.includes(uppercaseStr)) return uppercaseStr; | ||
if (index === 0) return str; | ||
if (index === words.length - 1) return str; | ||
if (str.length >= 4) return str; | ||
if (prepositions_default.includes(lowercaseStr)) return lowercaseStr; | ||
if (conjunctions_default.includes(lowercaseStr)) return lowercaseStr; | ||
if (articles_default.includes(lowercaseStr)) return lowercaseStr; | ||
return str; | ||
@@ -267,0 +259,0 @@ } |
{ | ||
"name": "@directus/format-title", | ||
"version": "10.1.2", | ||
"version": "11.0.0", | ||
"description": "Custom formatter that converts any string into Title Case", | ||
@@ -34,6 +34,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"tsup": "8.0.2", | ||
"tsup": "8.2.2", | ||
"typescript": "5.4.5", | ||
"vitest": "1.5.3", | ||
"@directus/tsconfig": "1.0.1" | ||
"@directus/tsconfig": "2.0.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "engines": { |
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
7965
266