@fatehan/tsrp 1.3.44 → 1.3.45

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.
@@ -1 +1 @@
1
- {"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../src/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,QAAA,MAAM,YAAY,GAChB,UAAU,QAAQ,EAAE,EACpB,UAAU,QAAQ,EAAE,EACpB,MAAM,IAAI,KACT,OAAO,EA2FT,CAAC;AA2IF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../src/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,QAAA,MAAM,YAAY,GAChB,UAAU,QAAQ,EAAE,EACpB,UAAU,QAAQ,EAAE,EACpB,MAAM,IAAI,KACT,OAAO,EA4FT,CAAC;AA8IF,eAAe,YAAY,CAAC"}
package/dist/system.io.js CHANGED
@@ -93,11 +93,15 @@ function Separator(value, seprator) {
93
93
  function safeEvalFormula(formula, xValue) {
94
94
  try {
95
95
  const replaced = formula.replace(/x/g, String(xValue));
96
- if (!/^[0-9+\-*/ ().]+$/.test(replaced))
96
+ if (!/^[0-9+\-*/ ().><=!&|]+$/.test(replaced))
97
97
  return null;
98
98
  const fn = new Function(`return (${replaced});`);
99
99
  const result = fn();
100
- return typeof result === "number" && !isNaN(result) ? result : null;
100
+ if (typeof result === "number" && !isNaN(result))
101
+ return result;
102
+ if (typeof result === "boolean")
103
+ return result;
104
+ return null;
101
105
  }
102
106
  catch {
103
107
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fatehan/tsrp",
3
- "version": "1.3.44",
3
+ "version": "1.3.45",
4
4
  "description": "fatehan main models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",