@bemoje/template 1.1.3 → 2.0.1

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/lib/index.cjs CHANGED
@@ -63,9 +63,7 @@ var Template = class {
63
63
  const stringTemplate = this.strategy.templateToString(this.template);
64
64
  const merged = value.Value.Cast(this.optionsSchema, data);
65
65
  assertValidSchema(this.optionsSchema, merged, "Invalid options");
66
- const populated = stringTemplate.replaceAll(/{{(\w+)}}/g, (_, key) => {
67
- return String(merged[key]);
68
- });
66
+ const populated = stringTemplate.replaceAll(/{{(\w+)}}/g, (_, key) => String(merged[key]));
69
67
  return this.strategy.render(populated);
70
68
  }
71
69
  /**
package/lib/index.js CHANGED
@@ -61,9 +61,7 @@ var Template = class {
61
61
  const stringTemplate = this.strategy.templateToString(this.template);
62
62
  const merged = Value.Cast(this.optionsSchema, data);
63
63
  assertValidSchema(this.optionsSchema, merged, "Invalid options");
64
- const populated = stringTemplate.replaceAll(/{{(\w+)}}/g, (_, key) => {
65
- return String(merged[key]);
66
- });
64
+ const populated = stringTemplate.replaceAll(/{{(\w+)}}/g, (_, key) => String(merged[key]));
67
65
  return this.strategy.render(populated);
68
66
  }
69
67
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bemoje/template",
3
- "version": "1.1.3",
3
+ "version": "2.0.1",
4
4
  "description": "A TypeScript template engine with schema validation and pluggable rendering strategies.",
5
5
  "type": "module",
6
6
  "sideEffects": false,