@danielhaim/titlecaser
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "@danielhaim/titlecaser", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Converts a string to title case with multiple style options, ability to ignore certain words, and handle acronyms", | ||
@@ -55,3 +55,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/cli": "^7.21.5", | ||
"@babel/cli": "^7.23.9", | ||
"@babel/core": "^7.22.1", | ||
@@ -70,8 +70,8 @@ "@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"jest-environment-jsdom": "^29.5.0", | ||
"jest-environment-puppeteer": "^9.0.0", | ||
"jest-puppeteer": "^9.0.0", | ||
"puppeteer": "^21.9.0", | ||
"puppeteer-core": "^21.9.0", | ||
"jest-environment-puppeteer": "^10.0.1", | ||
"jest-puppeteer": "^10.0.1", | ||
"puppeteer": "^22.1.0", | ||
"puppeteer-core": "^22.1.0", | ||
"terser-webpack-plugin": "^5.3.9", | ||
"webpack": "^5.90.0", | ||
"webpack": "^5.90.2", | ||
"webpack-cli": "^5.1.4", | ||
@@ -78,0 +78,0 @@ "webpack-node-externals": "^3.0.0" |
@@ -281,11 +281,10 @@ import { | ||
const index = this.wordReplacementsList.findIndex((obj) => Object.keys(obj)[0] === term); | ||
if (index !== -1) { | ||
// If the term already exists in the array, update the replacement value | ||
this.wordReplacementsList[index][term] = replacement; | ||
} else { | ||
// If the term doesn't exist in the array, add a new object with the term and replacement | ||
this.wordReplacementsList.push({ [term]: replacement }); | ||
} | ||
// Update the replace terms option | ||
this.options.wordReplacementsList = this.wordReplacementsList; | ||
@@ -292,0 +291,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
81932
1435