@stll/template-conditions 0.5.2 → 0.5.3

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1430,7 +1430,11 @@ const unwritableMarkerLiteral = (value, form = "output") => {
1430
1430
  /** One string literal, double-quoted, with backslashes and quotes escaped the
1431
1431
  * way `scanQuoted` reads them back. */
1432
1432
  const renderString = (value) => `"${value.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}"`;
1433
- const renderLiteral = (value) => typeof value === "string" ? renderString(value) : String(value);
1433
+ const renderLiteral = (value) => {
1434
+ if (typeof value === "string") return renderString(value);
1435
+ if (typeof value === "number" && Object.is(value, -0)) return "-0";
1436
+ return String(value);
1437
+ };
1434
1438
  const renderArgument = (arg) => arg.kind === "positional" ? renderLiteral(arg.value) : `${arg.name}=${renderLiteral(arg.value)}`;
1435
1439
  /** Every value in a chain the grammar has no spelling for, with the filter it
1436
1440
  * was written on and why, so a caller can refuse a configuration before it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/template-conditions",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "A document-template marker and condition engine: {{...}} marker grammar, parse, compute, serialize, field values.",
5
5
  "keywords": [
6
6
  "condition",