@isettingkit/business-rules 2.1.3 → 2.1.4
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.es.js +16 -5
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1663,11 +1663,22 @@ const jr = C.div`
|
|
|
1663
1663
|
[N.EQUAL]: to
|
|
1664
1664
|
}, _e = (e) => {
|
|
1665
1665
|
const n = e == null ? void 0 : e.value;
|
|
1666
|
-
if (typeof n == "string" && n.
|
|
1667
|
-
const t =
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1666
|
+
if (typeof n == "string" && n.includes(" a ")) {
|
|
1667
|
+
const t = [
|
|
1668
|
+
/De\s+([\d,.]+)\s+a\s+([\d,.]+)/,
|
|
1669
|
+
/Desde\s+([\d,.]+)\s+hasta\s+([\d,.]+)/,
|
|
1670
|
+
/Between\s+([\d,.]+)\s+and\s+([\d,.]+)/
|
|
1671
|
+
];
|
|
1672
|
+
for (const r of t) {
|
|
1673
|
+
const o = n.match(r);
|
|
1674
|
+
if (o) {
|
|
1675
|
+
const i = o[1], s = o[2];
|
|
1676
|
+
return console.log("🔍 Parseado string a objeto:", {
|
|
1677
|
+
from: i,
|
|
1678
|
+
to: s,
|
|
1679
|
+
original: n
|
|
1680
|
+
}), { from: i, to: s };
|
|
1681
|
+
}
|
|
1671
1682
|
}
|
|
1672
1683
|
return n;
|
|
1673
1684
|
}
|