teptris 0.3.14 → 0.3.15

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/teptris.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teptris",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "TOML for JavaScript/TypeScript at libteptris speed (WebAssembly, no fallback) - version tracks the engine ({engine}.{iteration}; npm semver is 3-part)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -264,8 +264,9 @@ export function initApi(mod) {
264
264
  }
265
265
  };
266
266
  const scalar = (k, v) => {
267
- if (k === null) { ensure(2); buf[n++] = 1; buf[n++] = 0; }
268
- else wkey(k);
267
+ // array ELEMENTS carry no key op (writer grammar v0.3.11): the
268
+ // old klen-0 marker is now a genuine empty key
269
+ if (k !== null) wkey(k);
269
270
  if (typeof v === "boolean") { byte(v ? 6 : 5); return; }
270
271
  if (typeof v === "number") {
271
272
  // the integer path only for numbers the int64 op can carry