mikel-eval 0.22.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -242,7 +242,7 @@ const defaultFunctions = {
242
242
  if (typeof str !== "string") {
243
243
  throw new Error(`replace() expects a string, got ${typeof str}`);
244
244
  }
245
- return str.replace(new RegExp(search, "g"), replacement || "");
245
+ return str.replaceAll(search, replacement || "");
246
246
  },
247
247
  toUpperCase: str => {
248
248
  if (typeof str !== "string") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mikel-eval",
3
3
  "description": "A mikel plugin for evaluating JavaScript expressions.",
4
- "version": "0.22.0",
4
+ "version": "0.22.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {