@tscircuit/footprinter 0.0.239 → 0.0.241
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.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7332,10 +7332,12 @@ var string2 = (def) => {
|
|
|
7332
7332
|
let fp2 = footprinter();
|
|
7333
7333
|
const modifiedDef = def.replace(/^((?:\d{4}|\d{5}))(?=$|_)/, "res$1");
|
|
7334
7334
|
const def_parts = modifiedDef.split(/_(?!metric)/).map((s) => {
|
|
7335
|
-
const m = s.match(/([a-
|
|
7335
|
+
const m = s.match(/([a-zA-Z]+)([\(\d\.\+\?].*)?/);
|
|
7336
7336
|
if (!m) return null;
|
|
7337
|
-
const [,
|
|
7338
|
-
if (!
|
|
7337
|
+
const [, rawFn, v] = m;
|
|
7338
|
+
if (!rawFn) return null;
|
|
7339
|
+
const fn = rawFn.toLowerCase();
|
|
7340
|
+
if (v?.includes("?")) return null;
|
|
7339
7341
|
return { fn, v };
|
|
7340
7342
|
}).filter(isNotNull);
|
|
7341
7343
|
for (const { fn, v } of def_parts) {
|