@adaas/are-html 0.0.10 → 0.0.12

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.
@@ -391,18 +391,28 @@ var AreDirectiveFor = class extends AreDirective {
391
391
  if (arg.startsWith("'") && arg.endsWith("'")) return arg.slice(1, -1);
392
392
  if (arg.startsWith('"') && arg.endsWith('"')) return arg.slice(1, -1);
393
393
  if (!isNaN(Number(arg))) return Number(arg);
394
- return store.get(arg);
394
+ const stripped = arg.replace(/\?$/, "");
395
+ if (stripped.includes(".")) {
396
+ const parts = stripped.split(".").map((p) => p.replace(/\?$/, ""));
397
+ let val = store.get(parts[0]);
398
+ for (let j = 1; j < parts.length; j++) {
399
+ if (val == null) return void 0;
400
+ val = val[parts[j]];
401
+ }
402
+ return val ?? void 0;
403
+ }
404
+ return store.get(stripped);
395
405
  });
396
406
  result = fn(...resolvedArgs);
397
407
  } else if (arrayExpr.includes(".")) {
398
- const parts = arrayExpr.split(".");
408
+ const parts = arrayExpr.split(".").map((p) => p.replace(/\?$/, ""));
399
409
  result = store.get(parts[0]);
400
410
  for (let i = 1; i < parts.length; i++) {
401
411
  if (result == null) break;
402
412
  result = result[parts[i]];
403
413
  }
404
414
  } else {
405
- result = store.get(arrayExpr);
415
+ result = store.get(arrayExpr.replace(/\?$/, ""));
406
416
  }
407
417
  if (result == null) return [];
408
418
  if (!Array.isArray(result))