@rfanth/tjson 0.6.1 → 0.6.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.
package/README.md CHANGED
@@ -81,6 +81,8 @@ All four functions throw an `Error` on invalid input.
81
81
 
82
82
  Options use **camelCase** in JavaScript. The underlying library's Rust API uses snake_case and idiomatic Rust, but exposes the same options.
83
83
 
84
+ Options must be a plain object; `null`/`undefined` mean defaults, and anything else (an array, a number) throws. Unknown fields are ignored — TypeScript catches misspelled names at compile time — except option names that were renamed or removed in a past release, which throw with a hint pointing at the replacement.
85
+
84
86
  **Key options:**
85
87
 
86
88
  | Option | Default | Description |
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@rfanth/tjson",
3
3
  "type": "module",
4
4
  "description": "Text JSON (TJSON) - a readability optimized, round trip compatible alternative to JSON",
5
- "version": "0.6.1",
5
+ "version": "0.6.3",
6
6
  "license": "BSD-3-Clause",
7
7
  "repository": {
8
8
  "type": "git",
package/tjson_bg.js CHANGED
@@ -128,7 +128,7 @@ export function toJson(input) {
128
128
  wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
129
129
  }
130
130
  }
131
- export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
131
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
132
132
  const ret = Error(getStringFromWasm0(arg0, arg1));
133
133
  return ret;
134
134
  }
@@ -139,68 +139,68 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
139
139
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
140
140
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
141
141
  }
142
- export function __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51(arg0, arg1) {
142
+ export function __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f(arg0, arg1) {
143
143
  const v = arg1;
144
144
  const ret = typeof(v) === 'bigint' ? v : undefined;
145
145
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
146
146
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
147
147
  }
148
- export function __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff(arg0) {
148
+ export function __wbg___wbindgen_boolean_get_fa956cfa2d1bd751(arg0) {
149
149
  const v = arg0;
150
150
  const ret = typeof(v) === 'boolean' ? v : undefined;
151
151
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
152
152
  }
153
- export function __wbg___wbindgen_debug_string_ab4b34d23d6778bd(arg0, arg1) {
153
+ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
154
154
  const ret = debugString(arg1);
155
155
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
156
156
  const len1 = WASM_VECTOR_LEN;
157
157
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
158
158
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
159
159
  }
160
- export function __wbg___wbindgen_in_a5d8b22e52b24dd1(arg0, arg1) {
160
+ export function __wbg___wbindgen_in_aca499c5de7ff5e5(arg0, arg1) {
161
161
  const ret = arg0 in arg1;
162
162
  return ret;
163
163
  }
164
- export function __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93(arg0) {
164
+ export function __wbg___wbindgen_is_bigint_2f76dc55065b4273(arg0) {
165
165
  const ret = typeof(arg0) === 'bigint';
166
166
  return ret;
167
167
  }
168
- export function __wbg___wbindgen_is_function_3baa9db1a987f47d(arg0) {
168
+ export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
169
169
  const ret = typeof(arg0) === 'function';
170
170
  return ret;
171
171
  }
172
- export function __wbg___wbindgen_is_null_52ff4ec04186736f(arg0) {
172
+ export function __wbg___wbindgen_is_null_ea9085d691f535d3(arg0) {
173
173
  const ret = arg0 === null;
174
174
  return ret;
175
175
  }
176
- export function __wbg___wbindgen_is_object_63322ec0cd6ea4ef(arg0) {
176
+ export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
177
177
  const val = arg0;
178
178
  const ret = typeof(val) === 'object' && val !== null;
179
179
  return ret;
180
180
  }
181
- export function __wbg___wbindgen_is_string_6df3bf7ef1164ed3(arg0) {
181
+ export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
182
182
  const ret = typeof(arg0) === 'string';
183
183
  return ret;
184
184
  }
185
- export function __wbg___wbindgen_is_undefined_29a43b4d42920abd(arg0) {
185
+ export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
186
186
  const ret = arg0 === undefined;
187
187
  return ret;
188
188
  }
189
- export function __wbg___wbindgen_jsval_eq_d3465d8a07697228(arg0, arg1) {
189
+ export function __wbg___wbindgen_jsval_eq_e659fcf7b0e32763(arg0, arg1) {
190
190
  const ret = arg0 === arg1;
191
191
  return ret;
192
192
  }
193
- export function __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c(arg0, arg1) {
193
+ export function __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170(arg0, arg1) {
194
194
  const ret = arg0 == arg1;
195
195
  return ret;
196
196
  }
197
- export function __wbg___wbindgen_number_get_c7f42aed0525c451(arg0, arg1) {
197
+ export function __wbg___wbindgen_number_get_394265ed1e1b84ee(arg0, arg1) {
198
198
  const obj = arg1;
199
199
  const ret = typeof(obj) === 'number' ? obj : undefined;
200
200
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
201
201
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
202
202
  }
203
- export function __wbg___wbindgen_string_get_7ed5322991caaec5(arg0, arg1) {
203
+ export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
204
204
  const obj = arg1;
205
205
  const ret = typeof(obj) === 'string' ? obj : undefined;
206
206
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -208,34 +208,34 @@ export function __wbg___wbindgen_string_get_7ed5322991caaec5(arg0, arg1) {
208
208
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
209
209
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
210
210
  }
211
- export function __wbg___wbindgen_throw_6b64449b9b9ed33c(arg0, arg1) {
211
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
212
212
  throw new Error(getStringFromWasm0(arg0, arg1));
213
213
  }
214
- export function __wbg_call_14b169f759b26747() { return handleError(function (arg0, arg1) {
214
+ export function __wbg_call_8a2dd23819f8a60a() { return handleError(function (arg0, arg1) {
215
215
  const ret = arg0.call(arg1);
216
216
  return ret;
217
217
  }, arguments); }
218
- export function __wbg_done_9158f7cc8751ba32(arg0) {
218
+ export function __wbg_done_89b2b13e91a60321(arg0) {
219
219
  const ret = arg0.done;
220
220
  return ret;
221
221
  }
222
- export function __wbg_entries_e0b73aa8571ddb56(arg0) {
222
+ export function __wbg_entries_015dc610cd81ede0(arg0) {
223
223
  const ret = Object.entries(arg0);
224
224
  return ret;
225
225
  }
226
- export function __wbg_get_1affdbdd5573b16a() { return handleError(function (arg0, arg1) {
227
- const ret = Reflect.get(arg0, arg1);
228
- return ret;
229
- }, arguments); }
230
- export function __wbg_get_8360291721e2339f(arg0, arg1) {
226
+ export function __wbg_get_507a50627bffa49b(arg0, arg1) {
231
227
  const ret = arg0[arg1 >>> 0];
232
228
  return ret;
233
229
  }
234
- export function __wbg_get_unchecked_17f53dad852b9588(arg0, arg1) {
230
+ export function __wbg_get_c7eb1f358a7654df() { return handleError(function (arg0, arg1) {
231
+ const ret = Reflect.get(arg0, arg1);
232
+ return ret;
233
+ }, arguments); }
234
+ export function __wbg_get_unchecked_6e0ad6d2a41b06f6(arg0, arg1) {
235
235
  const ret = arg0[arg1 >>> 0];
236
236
  return ret;
237
237
  }
238
- export function __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3(arg0) {
238
+ export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
239
239
  let result;
240
240
  try {
241
241
  result = arg0 instanceof ArrayBuffer;
@@ -245,7 +245,7 @@ export function __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3(arg0) {
245
245
  const ret = result;
246
246
  return ret;
247
247
  }
248
- export function __wbg_instanceof_Map_1b76fd4635be43eb(arg0) {
248
+ export function __wbg_instanceof_Map_e5b5e3db98422fcc(arg0) {
249
249
  let result;
250
250
  try {
251
251
  result = arg0 instanceof Map;
@@ -255,7 +255,7 @@ export function __wbg_instanceof_Map_1b76fd4635be43eb(arg0) {
255
255
  const ret = result;
256
256
  return ret;
257
257
  }
258
- export function __wbg_instanceof_Uint8Array_152ba1f289edcf3f(arg0) {
258
+ export function __wbg_instanceof_Uint8Array_309b927aaf7a3fc7(arg0) {
259
259
  let result;
260
260
  try {
261
261
  result = arg0 instanceof Uint8Array;
@@ -265,68 +265,68 @@ export function __wbg_instanceof_Uint8Array_152ba1f289edcf3f(arg0) {
265
265
  const ret = result;
266
266
  return ret;
267
267
  }
268
- export function __wbg_isArray_c3109d14ffc06469(arg0) {
268
+ export function __wbg_isArray_0677c962b281d01a(arg0) {
269
269
  const ret = Array.isArray(arg0);
270
270
  return ret;
271
271
  }
272
- export function __wbg_isSafeInteger_4fc213d1989d6d2a(arg0) {
272
+ export function __wbg_isSafeInteger_04f36e4056f1b851(arg0) {
273
273
  const ret = Number.isSafeInteger(arg0);
274
274
  return ret;
275
275
  }
276
- export function __wbg_iterator_013bc09ec998c2a7() {
276
+ export function __wbg_iterator_6f722e4a93058b71() {
277
277
  const ret = Symbol.iterator;
278
278
  return ret;
279
279
  }
280
- export function __wbg_length_3d4ecd04bd8d22f1(arg0) {
280
+ export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
281
281
  const ret = arg0.length;
282
282
  return ret;
283
283
  }
284
- export function __wbg_length_9f1775224cf1d815(arg0) {
284
+ export function __wbg_length_370319915dc99107(arg0) {
285
285
  const ret = arg0.length;
286
286
  return ret;
287
287
  }
288
- export function __wbg_new_0c7403db6e782f19(arg0) {
289
- const ret = new Uint8Array(arg0);
288
+ export function __wbg_new_32b398fb48b6d94a() {
289
+ const ret = new Array();
290
290
  return ret;
291
291
  }
292
- export function __wbg_new_34d45cc8e36aaead() {
292
+ export function __wbg_new_7796ffc7ed656783() {
293
293
  const ret = new Map();
294
294
  return ret;
295
295
  }
296
- export function __wbg_new_5e360d2ff7b9e1c3(arg0, arg1) {
296
+ export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
297
297
  const ret = new Error(getStringFromWasm0(arg0, arg1));
298
298
  return ret;
299
299
  }
300
- export function __wbg_new_682678e2f47e32bc() {
301
- const ret = new Array();
300
+ export function __wbg_new_cd45aabdf6073e84(arg0) {
301
+ const ret = new Uint8Array(arg0);
302
302
  return ret;
303
303
  }
304
- export function __wbg_new_aa8d0fa9762c29bd() {
304
+ export function __wbg_new_da52cf8fe3429cb2() {
305
305
  const ret = new Object();
306
306
  return ret;
307
307
  }
308
- export function __wbg_next_0340c4ae324393c3() { return handleError(function (arg0) {
309
- const ret = arg0.next();
310
- return ret;
311
- }, arguments); }
312
- export function __wbg_next_7646edaa39458ef7(arg0) {
308
+ export function __wbg_next_6dbf2c0ac8cde20f(arg0) {
313
309
  const ret = arg0.next;
314
310
  return ret;
315
311
  }
316
- export function __wbg_prototypesetcall_a6b02eb00b0f4ce2(arg0, arg1, arg2) {
312
+ export function __wbg_next_71f2aa1cb3d1e37e() { return handleError(function (arg0) {
313
+ const ret = arg0.next();
314
+ return ret;
315
+ }, arguments); }
316
+ export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
317
317
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
318
318
  }
319
- export function __wbg_set_3bf1de9fab0cd644(arg0, arg1, arg2) {
320
- arg0[arg1 >>> 0] = arg2;
319
+ export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
320
+ const ret = arg0.set(arg1, arg2);
321
+ return ret;
321
322
  }
322
323
  export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
323
324
  arg0[arg1] = arg2;
324
325
  }
325
- export function __wbg_set_fde2cec06c23692b(arg0, arg1, arg2) {
326
- const ret = arg0.set(arg1, arg2);
327
- return ret;
326
+ export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
327
+ arg0[arg1 >>> 0] = arg2;
328
328
  }
329
- export function __wbg_value_ee3a06f4579184fa(arg0) {
329
+ export function __wbg_value_a5d5488a9589444a(arg0) {
330
330
  const ret = arg0.value;
331
331
  return ret;
332
332
  }
@@ -439,8 +439,7 @@ function getDataViewMemory0() {
439
439
  }
440
440
 
441
441
  function getStringFromWasm0(ptr, len) {
442
- ptr = ptr >>> 0;
443
- return decodeText(ptr, len);
442
+ return decodeText(ptr >>> 0, len);
444
443
  }
445
444
 
446
445
  let cachedUint8ArrayMemory0 = null;
package/tjson_bg.wasm CHANGED
Binary file