@ztimson/utils 0.27.18 → 0.27.19
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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2312,7 +2312,7 @@ ${opts.message || this.desc}`;
|
|
|
2312
2312
|
};
|
|
2313
2313
|
const evaluate = (code, data2, fatal = true) => {
|
|
2314
2314
|
try {
|
|
2315
|
-
return Function("data", `
|
|
2315
|
+
return Function("data", `with(data) { return ${code}; }`)(data2);
|
|
2316
2316
|
} catch {
|
|
2317
2317
|
if (fatal) throw new TemplateError(`Failed to evaluate: ${code}`);
|
|
2318
2318
|
else return false;
|