@ztimson/utils 0.28.12 → 0.28.13
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 +62 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +62 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2326,7 +2326,68 @@ ${opts.message || this.desc}`;
|
|
|
2326
2326
|
function findTemplateVars(html) {
|
|
2327
2327
|
const variables = /* @__PURE__ */ new Set();
|
|
2328
2328
|
const arrays = /* @__PURE__ */ new Set();
|
|
2329
|
-
const excluded = /* @__PURE__ */ new Set([
|
|
2329
|
+
const excluded = /* @__PURE__ */ new Set([
|
|
2330
|
+
"let",
|
|
2331
|
+
"const",
|
|
2332
|
+
"var",
|
|
2333
|
+
"function",
|
|
2334
|
+
"if",
|
|
2335
|
+
"while",
|
|
2336
|
+
"do",
|
|
2337
|
+
"this",
|
|
2338
|
+
"typeof",
|
|
2339
|
+
"new",
|
|
2340
|
+
"instanceof",
|
|
2341
|
+
"in",
|
|
2342
|
+
"for",
|
|
2343
|
+
"else",
|
|
2344
|
+
"case",
|
|
2345
|
+
"break",
|
|
2346
|
+
"continue",
|
|
2347
|
+
"switch",
|
|
2348
|
+
"default",
|
|
2349
|
+
"with",
|
|
2350
|
+
"eval",
|
|
2351
|
+
"arguments",
|
|
2352
|
+
"void",
|
|
2353
|
+
"delete",
|
|
2354
|
+
"null",
|
|
2355
|
+
"undefined",
|
|
2356
|
+
"true",
|
|
2357
|
+
"false",
|
|
2358
|
+
"async",
|
|
2359
|
+
"await",
|
|
2360
|
+
"try",
|
|
2361
|
+
"catch",
|
|
2362
|
+
"finally",
|
|
2363
|
+
"throw",
|
|
2364
|
+
"return",
|
|
2365
|
+
"yield",
|
|
2366
|
+
"debugger",
|
|
2367
|
+
"extends",
|
|
2368
|
+
"import",
|
|
2369
|
+
"export",
|
|
2370
|
+
"class",
|
|
2371
|
+
"super",
|
|
2372
|
+
"static",
|
|
2373
|
+
"get",
|
|
2374
|
+
"set",
|
|
2375
|
+
"constructor",
|
|
2376
|
+
"enum",
|
|
2377
|
+
"implements",
|
|
2378
|
+
"interface",
|
|
2379
|
+
"package",
|
|
2380
|
+
"private",
|
|
2381
|
+
"protected",
|
|
2382
|
+
"public",
|
|
2383
|
+
"abstract",
|
|
2384
|
+
"final",
|
|
2385
|
+
"native",
|
|
2386
|
+
"synchronized",
|
|
2387
|
+
"throws",
|
|
2388
|
+
"transient",
|
|
2389
|
+
"volatile"
|
|
2390
|
+
]);
|
|
2330
2391
|
for (const loop of matchAll(html, /\{\{\s*?\*\s*?(.+?)\s+in\s+(.+?)\s*?}}/g)) {
|
|
2331
2392
|
const [element, index = "index"] = loop[1].replaceAll(/[()\s]/g, "").split(",");
|
|
2332
2393
|
excluded.add(element);
|