@qubit-ltd/json 1.1.4 → 1.2.0

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.
@@ -54,25 +54,25 @@
54
54
  <a href="README.zh_CN.md"><img src="https://img.shields.io/badge/%E6%96%87%E6%A1%A3-%E4%B8%AD%E6%96%87%E7%89%88-blue.svg" alt="中文文档"></a>
55
55
  <a href="https://dl.circleci.com/status-badge/redirect/gh/Haixing-Hu/js-json/tree/master"><img src="https://dl.circleci.com/status-badge/img/gh/Haixing-Hu/js-json/tree/master.svg?style=shield" alt="CircleCI"></a>
56
56
  <a href="https://coveralls.io/github/Haixing-Hu/js-json?branch=master"><img src="https://coveralls.io/repos/github/Haixing-Hu/js-json/badge.svg?branch=master" alt="Coverage Status"></a></p>
57
- <p><a href="https://npmjs.com/package/@qubit-ltd/json">@qubit-ltd/json</a> is a JavaScript library that extends the functionality of the
57
+ <p><a href="https://npmjs.com/package/@qubit-ltd/json">@qubit-ltd/json</a> is a JavaScript library that extends the functionality of the
58
58
  standard JSON object, providing robust support for working with numbers that
59
- exceed JavaScripts safe range. It offers enhanced parsing and stringifying
59
+ exceed JavaScript's safe range. It offers enhanced parsing and stringifying
60
60
  capabilities, making it ideal for handling large datasets and complex numerical
61
- operations while adhering to JSONs structure.</p>
61
+ operations while adhering to JSON's structure.</p>
62
62
  <h2>Key Features</h2>
63
63
  <ul>
64
- <li><code>BigInt</code> Support: When parsing JSON strings, numbers outside JavaScripts safe
64
+ <li><strong><code>BigInt</code> Support</strong>: When parsing JSON strings, numbers outside JavaScript's safe
65
65
  integer range are automatically converted to the native <code>BigInt</code>, ensuring
66
66
  precision is maintained.</li>
67
- <li><code>LosslessNumber</code> Handling: For floating-point numbers that cannot be accurately
67
+ <li><strong><code>LosslessNumber</code> Handling</strong>: For floating-point numbers that cannot be accurately
68
68
  represented in JavaScript, this library introduces the <code>LosslessNumber</code> object.
69
69
  This lightweight object preserves the full precision of the number as a string,
70
70
  allowing flexible conversion to number or <code>BigInt</code> for mathematical operations.</li>
71
- <li>Accurate Stringification: During the stringify process, <code>BigInt</code> values are
72
- serialized as strings without the n suffix, maintaining compatibility with
71
+ <li><strong>Accurate Stringification</strong>: During the stringify process, <code>BigInt</code> values are
72
+ serialized as strings without the &quot;n&quot; suffix, maintaining compatibility with
73
73
  the standard JSON format. Similarly, <code>LosslessNumber</code> objects are serialized
74
74
  using their internal string representation.</li>
75
- <li>Collection Serialization: JavaScripts native collections like <code>Set</code> and <code>Map</code>
75
+ <li><strong>Collection Serialization</strong>: JavaScript's native collections like <code>Set</code> and <code>Map</code>
76
76
  are seamlessly serialized as arrays, allowing for better compatibility with
77
77
  JSON structures.</li>
78
78
  </ul>
@@ -93,44 +93,88 @@ enhanced capabilities for handling large integers, floating-point numbers, and
93
93
  collections like Set and Map.</p>
94
94
  <pre class="prettyprint source lang-javascript"><code>import Json from '@qubit-ltd/json';
95
95
 
96
- // parse numbers outside the safe range
96
+ // Parse numbers outside the safe range
97
97
  const str1 = '{&quot;decimal&quot;:2.370,&quot;big_int&quot;:9123372036854000123,&quot;big_float&quot;:2.3e+500}';
98
- const obj1 = Json.parse(text);
98
+ const obj1 = Json.parse(str1);
99
99
  console.log(obj1.decimal); // 2.37
100
100
  console.log(obj1.big_int); // 9123372036854000123n
101
101
  console.log(obj1.big_float); // LosslessNumber { value: '2.3e+500', isLosslessNumber: true }
102
102
  console.log(String(obj1.big_float)); // '2.3e+500'
103
103
 
104
- // stringify numbers outside the safe range
104
+ // Stringify numbers outside the safe range
105
105
  const json1 = Json.stringify(obj1);
106
106
  console.log(json1); // '{&quot;decimal&quot;:2.37,&quot;big_int&quot;:9123372036854000123,&quot;big_float&quot;:&quot;2.3e+500&quot;}'
107
107
 
108
- // stringify collections
108
+ // Stringify collections
109
109
  const obj2 = {
110
110
  x: new Set([{ a: 1 }, { b: 2 }, { c: 3 }]),
111
111
  y: new Map([[1, { a: 2 }], [2, { b: 4 }]]),
112
112
  };
113
- const json2 = Json.stringify(obj);
113
+ const json2 = Json.stringify(obj2);
114
114
  console.log(json2); // '{&quot;x&quot;:[{&quot;a&quot;:1},{&quot;b&quot;:2},{&quot;c&quot;:3}],&quot;y&quot;:[[1,{&quot;a&quot;:2}],[2,{&quot;b&quot;:4}]]}'
115
115
 
116
- const json3 = Json.stringify(obj, null, 2);
117
- console.log(json3); //
116
+ // Pretty-print with indentation
117
+ const json3 = Json.stringify(obj2, null, 2);
118
+ console.log(json3);
119
+ /* Output:
120
+ {
121
+ &quot;x&quot;: [
122
+ {
123
+ &quot;a&quot;: 1
124
+ },
125
+ {
126
+ &quot;b&quot;: 2
127
+ },
128
+ {
129
+ &quot;c&quot;: 3
130
+ }
131
+ ],
132
+ &quot;y&quot;: [
133
+ [
134
+ 1,
135
+ {
136
+ &quot;a&quot;: 2
137
+ }
138
+ ],
139
+ [
140
+ 2,
141
+ {
142
+ &quot;b&quot;: 4
143
+ }
144
+ ]
145
+ ]
146
+ }
147
+ */
118
148
  </code></pre>
119
149
  <h3>LosslessNumber Class</h3>
120
- <p>The LosslessNumber class is used to handle floating-point numbers with full
150
+ <p>The <code>LosslessNumber</code> class is used to handle floating-point numbers with full
121
151
  precision, avoiding truncation or rounding issues.</p>
122
152
  <pre class="prettyprint source lang-javascript"><code>import Json from '@qubit-ltd/json';
153
+ import { LosslessNumber } from '@qubit-ltd/json';
154
+
155
+ // Parse a number with high precision
123
156
  const parsed = Json.parse('{&quot;float&quot;: 1.234567891234567891234}');
124
157
  console.log(parsed.float); // LosslessNumber { value: '1.234567891234567891234' }
125
158
 
126
159
  // Convert LosslessNumber to standard number
127
- console.log(parsed.float.valueOf()); // 1.2345678912345679 (standard JS number)
160
+ console.log(parsed.float.valueOf()); // 1.2345678912345679 (standard JS number, precision loss)
161
+
162
+ // Create a LosslessNumber directly
163
+ const largeNumber = new LosslessNumber('9876543210.123456789012345678901234567890');
164
+ console.log(largeNumber.toString()); // '9876543210.123456789012345678901234567890'
165
+ console.log(largeNumber.valueOf()); // 9876543210.123457 (standard JS number with precision loss)
166
+
167
+ // Mathematical operations
168
+ const num1 = new LosslessNumber('1234567890.123456789');
169
+ const num2 = 100;
170
+ // For math operations, LosslessNumber is converted to standard number (with potential precision loss)
171
+ console.log(num1 * num2); // 123456789012.34578
128
172
  </code></pre>
129
173
  <h3>Utility Functions</h3>
130
174
  <p>This library provides a set of utility functions to aid in the handling of large
131
175
  numbers and ensure safe conversions.</p>
132
176
  <h4><code>isBigInt(value)</code></h4>
133
- <p>Checks if a string represents a <code>BigInt</code> (i.e., ends with an n suffix).</p>
177
+ <p>Checks if a string represents a <code>BigInt</code> (i.e., ends with an &quot;n&quot; suffix).</p>
134
178
  <pre class="prettyprint source lang-javascript"><code>import { isBigInt } from '@qubit-ltd/json';
135
179
 
136
180
  console.log(isBigInt('12345n')); // true
@@ -142,6 +186,8 @@ console.log(isBigInt('12345')); // false
142
186
 
143
187
  console.log(isInteger('12345')); // true
144
188
  console.log(isInteger('123.45')); // false
189
+ console.log(isInteger('123e5')); // true (12300000 is an integer)
190
+ console.log(isInteger('123e-5')); // false (0.00123 is not an integer)
145
191
  </code></pre>
146
192
  <h4><code>isNumber(value)</code></h4>
147
193
  <p>Checks if a string represents a number.</p>
@@ -151,25 +197,32 @@ console.log(isNumber('12345')); // true
151
197
  console.log(isNumber('-123.45')); // true
152
198
  console.log(isNumber('1.23e-11')); // true
153
199
  console.log(isNumber('abc')); // false
200
+ console.log(isNumber('123abc')); // false
201
+ console.log(isNumber('0xFF')); // false (hexadecimal notation not supported)
154
202
  </code></pre>
155
203
  <h4><code>isSafeNumber(value, options)</code></h4>
156
- <p>Checks if a string represents a number within JavaScripts safe range.</p>
204
+ <p>Checks if a string represents a number within JavaScript's safe range.</p>
157
205
  <pre class="prettyprint source lang-javascript"><code>import { isSafeNumber } from '@qubit-ltd/json';
158
206
 
159
207
  console.log(isSafeNumber('12345')); // true
160
- console.log(isSafeNumber('12345678901234567890')); // false
161
- console.log(isSafeNumber('123.45678901234567890')); // false
162
- console.log(isSafeNumber('123.45678901234567890', { approx: true, requiredDigits: 16 })); // true
208
+ console.log(isSafeNumber('12345678901234567890')); // false (too large for JavaScript's number type)
209
+ console.log(isSafeNumber('123.45678901234567890')); // false (too many significant digits)
210
+
211
+ // With options
212
+ console.log(isSafeNumber('123.45678901234567890', {
213
+ approx: true, // Allow approximate representation
214
+ requiredDigits: 16 // Require at least 16 digits of precision
215
+ })); // true
163
216
  </code></pre>
164
217
  <h4><code>getUnsafeReason(value)</code></h4>
165
218
  <p>Explains why a number represented by a string is unsafe, returning one of the
166
219
  following reasons:</p>
167
220
  <ul>
168
- <li><code>'overflow'</code></li>
169
- <li><code>'underflow'</code></li>
170
- <li><code>'truncate_integer'</code></li>
171
- <li><code>'truncate_float'</code></li>
172
- <li><code>'none'</code>: when the value is safe</li>
221
+ <li><code>'overflow'</code>: The number is too large to be represented in JavaScript</li>
222
+ <li><code>'underflow'</code>: The number is too small to be represented in JavaScript</li>
223
+ <li><code>'truncate_integer'</code>: The integer part would be truncated if converted to a JavaScript number</li>
224
+ <li><code>'truncate_float'</code>: The floating-point part would lose precision if converted to a JavaScript number</li>
225
+ <li><code>'none'</code>: The value is safe to convert to a JavaScript number</li>
173
226
  </ul>
174
227
  <pre class="prettyprint source lang-javascript"><code>import { getUnsafeReason } from '@qubit-ltd/json';
175
228
 
@@ -181,7 +234,7 @@ console.log(getUnsafeReason('1e-324')); // Output: 'underflow'
181
234
  </code></pre>
182
235
  <h4><code>toSafeNumberOrThrow(value, options)</code></h4>
183
236
  <p>Converts a string into a number if it is safe to do so. Throws an error if the
184
- number is unsafe, explaining the reason.</p>
237
+ number is unsafe, explaining the reason. This is useful for validating numeric inputs.</p>
185
238
  <pre class="prettyprint source lang-javascript"><code>import { toSafeNumberOrThrow } from '@qubit-ltd/json';
186
239
 
187
240
  try {
@@ -190,11 +243,125 @@ try {
190
243
  console.error(e.message); // Output: 'Cannot safely convert to number: the value '-12345678901234567890' would truncate integer and become -12345678901234567000'
191
244
  }
192
245
 
246
+ // Safe conversion example
193
247
  console.log(toSafeNumberOrThrow('9007199254740991')); // Output: 9007199254740991
248
+
249
+ // With options
250
+ try {
251
+ console.log(toSafeNumberOrThrow('123.45678901234567890', {
252
+ approx: false, // Do not allow approximate representation
253
+ requiredDigits: 20 // Require at least 20 digits of precision
254
+ }));
255
+ } catch (e) {
256
+ console.error(e.message); // Will throw error about precision loss
257
+ }
258
+ </code></pre>
259
+ <h2>Advanced Usage</h2>
260
+ <h3>Custom Parsing Options</h3>
261
+ <p>You can customize how numbers are parsed using options:</p>
262
+ <pre class="prettyprint source lang-javascript"><code>import Json from '@qubit-ltd/json';
263
+
264
+ const json = '{&quot;bigInt&quot;: 9007199254740993, &quot;largeFloat&quot;: 1.234567890123456789}';
265
+
266
+ // Use custom parsing options
267
+ const result = Json.parse(json, {
268
+ useBigInt: true, // Default is true - convert large integers to BigInt
269
+ losslessNumbers: true, // Default is true - use LosslessNumber for high-precision floats
270
+ });
271
+
272
+ console.log(typeof result.bigInt); // 'bigint'
273
+ console.log(result.bigInt); // 9007199254740993n
274
+ console.log(result.largeFloat); // LosslessNumber { value: '1.234567890123456789' }
275
+
276
+ // Disable custom number handling
277
+ const standardResult = Json.parse(json, {
278
+ useBigInt: false,
279
+ losslessNumbers: false,
280
+ });
281
+
282
+ console.log(typeof standardResult.bigInt); // 'number'
283
+ console.log(standardResult.bigInt); // 9007199254740992 (precision loss!)
284
+ console.log(standardResult.largeFloat); // 1.2345678901234568 (precision loss!)
285
+ </code></pre>
286
+ <h3>Custom Stringification Options</h3>
287
+ <p>You can customize how values are stringified:</p>
288
+ <pre class="prettyprint source lang-javascript"><code>import Json from '@qubit-ltd/json';
289
+
290
+ const data = {
291
+ bigInt: BigInt('9007199254740993'),
292
+ largeFloat: new LosslessNumber('1.234567890123456789'),
293
+ set: new Set([1, 2, 3]),
294
+ map: new Map([['a', 1], ['b', 2]]),
295
+ };
296
+
297
+ // Default stringification (handles BigInt, LosslessNumber, Set, Map)
298
+ console.log(Json.stringify(data));
299
+ // '{&quot;bigInt&quot;:9007199254740993,&quot;largeFloat&quot;:&quot;1.234567890123456789&quot;,&quot;set&quot;:[1,2,3],&quot;map&quot;:[[&quot;a&quot;,1],[&quot;b&quot;,2]]}'
300
+
301
+ // With custom options and indentation
302
+ console.log(Json.stringify(data, null, 2));
303
+ /* Output:
304
+ {
305
+ &quot;bigInt&quot;: 9007199254740993,
306
+ &quot;largeFloat&quot;: &quot;1.234567890123456789&quot;,
307
+ &quot;set&quot;: [
308
+ 1,
309
+ 2,
310
+ 3
311
+ ],
312
+ &quot;map&quot;: [
313
+ [
314
+ &quot;a&quot;,
315
+ 1
316
+ ],
317
+ [
318
+ &quot;b&quot;,
319
+ 2
320
+ ]
321
+ ]
322
+ }
323
+ */
194
324
  </code></pre>
195
325
  <h2><span id="contributing">Contributing</span></h2>
196
326
  <p>If you find any issues or have suggestions for improvements, please feel free
197
327
  to open an issue or submit a pull request to the <a href="https://github.com/Haixing-Hu/js-json">GitHub repository</a>.</p>
328
+ <h3>Development Setup</h3>
329
+ <ol>
330
+ <li>
331
+ <p>Clone the repository:</p>
332
+ <pre class="prettyprint source lang-sh"><code>git clone https://github.com/Haixing-Hu/js-json.git
333
+ cd js-json
334
+ </code></pre>
335
+ </li>
336
+ <li>
337
+ <p>Install dependencies:</p>
338
+ <pre class="prettyprint source lang-sh"><code>yarn install
339
+ </code></pre>
340
+ </li>
341
+ <li>
342
+ <p>Run tests:</p>
343
+ <pre class="prettyprint source lang-sh"><code>yarn test
344
+ </code></pre>
345
+ </li>
346
+ <li>
347
+ <p>Build the library:</p>
348
+ <pre class="prettyprint source lang-sh"><code>yarn build
349
+ </code></pre>
350
+ </li>
351
+ </ol>
352
+ <h3>Release Process</h3>
353
+ <ol>
354
+ <li>Update version in package.json</li>
355
+ <li>Run tests and linting:<pre class="prettyprint source lang-sh"><code>yarn lint && yarn test
356
+ </code></pre>
357
+ </li>
358
+ <li>Build the library:<pre class="prettyprint source lang-sh"><code>yarn build:all
359
+ </code></pre>
360
+ </li>
361
+ <li>Publish to npm:<pre class="prettyprint source lang-sh"><code>yarn deploy
362
+ </code></pre>
363
+ </li>
364
+ </ol>
198
365
  <h2><span id="license">License</span></h2>
199
366
  <p><a href="https://npmjs.com/package/@qubit-ltd/json">@qubit-ltd/json</a> is distributed under the Apache 2.0 license.
200
367
  See the <a href="LICENSE">LICENSE</a> file for more details.</p>
@@ -226,7 +393,7 @@ in shaping the functionality of this library.</p></article>
226
393
 
227
394
  <footer>
228
395
  Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a>
229
- on Sun Jan 05 2025 14:35:14 GMT+0800 (China Standard Time)
396
+ on Wed Apr 16 2025 18:02:33 GMT+0800 (China Standard Time)
230
397
  using the <a href="https://github.com/Haixing-Hu/jsdoc-minami">customized Minami theme</a>.
231
398
  </footer>
232
399
 
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
4929
4929
  </script>
4930
4930
  <script>
4931
4931
  /*<!--*/
4932
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"json.min.mjs","children":[{"name":"node_modules/json-custom-numbers","children":[{"uid":"92598439-1","name":"parse.mjs"},{"uid":"92598439-3","name":"stringify.mjs"}]},{"name":"src","children":[{"name":"utils","children":[{"uid":"92598439-5","name":"is-integer.js"},{"uid":"92598439-7","name":"extract-significant-digits.js"},{"uid":"92598439-9","name":"is-safe-number.js"},{"uid":"92598439-11","name":"is-number.js"},{"uid":"92598439-13","name":"get-unsafe-reason.js"},{"uid":"92598439-15","name":"lossless-number.js"},{"uid":"92598439-25","name":"is-bigint.js"},{"uid":"92598439-27","name":"to-safe-number-or-throw.js"}]},{"uid":"92598439-17","name":"parse-number.js"},{"uid":"92598439-19","name":"format-number.js"},{"uid":"92598439-21","name":"collection-replacer.js"},{"uid":"92598439-23","name":"json.js"},{"uid":"92598439-29","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"92598439-1":{"renderedLength":5022,"gzipLength":2137,"brotliLength":1921,"metaUid":"92598439-0"},"92598439-3":{"renderedLength":2649,"gzipLength":1397,"brotliLength":1235,"metaUid":"92598439-2"},"92598439-5":{"renderedLength":669,"gzipLength":321,"brotliLength":274,"metaUid":"92598439-4"},"92598439-7":{"renderedLength":1065,"gzipLength":464,"brotliLength":388,"metaUid":"92598439-6"},"92598439-9":{"renderedLength":2397,"gzipLength":912,"brotliLength":718,"metaUid":"92598439-8"},"92598439-11":{"renderedLength":787,"gzipLength":408,"brotliLength":317,"metaUid":"92598439-10"},"92598439-13":{"renderedLength":1108,"gzipLength":441,"brotliLength":365,"metaUid":"92598439-12"},"92598439-15":{"renderedLength":2673,"gzipLength":1033,"brotliLength":854,"metaUid":"92598439-14"},"92598439-17":{"renderedLength":834,"gzipLength":358,"brotliLength":290,"metaUid":"92598439-16"},"92598439-19":{"renderedLength":1045,"gzipLength":382,"brotliLength":321,"metaUid":"92598439-18"},"92598439-21":{"renderedLength":862,"gzipLength":340,"brotliLength":295,"metaUid":"92598439-20"},"92598439-23":{"renderedLength":904,"gzipLength":416,"brotliLength":327,"metaUid":"92598439-22"},"92598439-25":{"renderedLength":670,"gzipLength":324,"brotliLength":252,"metaUid":"92598439-24"},"92598439-27":{"renderedLength":1512,"gzipLength":636,"brotliLength":533,"metaUid":"92598439-26"},"92598439-29":{"renderedLength":264,"gzipLength":101,"brotliLength":98,"metaUid":"92598439-28"}},"nodeMetas":{"92598439-0":{"id":"/node_modules/json-custom-numbers/parse.mjs","moduleParts":{"json.min.mjs":"92598439-1"},"imported":[],"importedBy":[{"uid":"92598439-30"}]},"92598439-2":{"id":"/node_modules/json-custom-numbers/stringify.mjs","moduleParts":{"json.min.mjs":"92598439-3"},"imported":[],"importedBy":[{"uid":"92598439-30"}]},"92598439-4":{"id":"/src/utils/is-integer.js","moduleParts":{"json.min.mjs":"92598439-5"},"imported":[],"importedBy":[{"uid":"92598439-28"},{"uid":"92598439-8"},{"uid":"92598439-12"},{"uid":"92598439-16"}]},"92598439-6":{"id":"/src/utils/extract-significant-digits.js","moduleParts":{"json.min.mjs":"92598439-7"},"imported":[],"importedBy":[{"uid":"92598439-8"},{"uid":"92598439-12"}]},"92598439-8":{"id":"/src/utils/is-safe-number.js","moduleParts":{"json.min.mjs":"92598439-9"},"imported":[{"uid":"92598439-4"},{"uid":"92598439-6"}],"importedBy":[{"uid":"92598439-28"},{"uid":"92598439-26"},{"uid":"92598439-16"}]},"92598439-10":{"id":"/src/utils/is-number.js","moduleParts":{"json.min.mjs":"92598439-11"},"imported":[],"importedBy":[{"uid":"92598439-28"},{"uid":"92598439-14"}]},"92598439-12":{"id":"/src/utils/get-unsafe-reason.js","moduleParts":{"json.min.mjs":"92598439-13"},"imported":[{"uid":"92598439-4"},{"uid":"92598439-6"}],"importedBy":[{"uid":"92598439-28"},{"uid":"92598439-14"},{"uid":"92598439-26"}]},"92598439-14":{"id":"/src/utils/lossless-number.js","moduleParts":{"json.min.mjs":"92598439-15"},"imported":[{"uid":"92598439-31"},{"uid":"92598439-32"},{"uid":"92598439-33"},{"uid":"92598439-10"},{"uid":"92598439-12"}],"importedBy":[{"uid":"92598439-28"},{"uid":"92598439-16"},{"uid":"92598439-18"}]},"92598439-16":{"id":"/src/parse-number.js","moduleParts":{"json.min.mjs":"92598439-17"},"imported":[{"uid":"92598439-4"},{"uid":"92598439-8"},{"uid":"92598439-14"}],"importedBy":[{"uid":"92598439-22"}]},"92598439-18":{"id":"/src/format-number.js","moduleParts":{"json.min.mjs":"92598439-19"},"imported":[{"uid":"92598439-14"}],"importedBy":[{"uid":"92598439-22"}]},"92598439-20":{"id":"/src/collection-replacer.js","moduleParts":{"json.min.mjs":"92598439-21"},"imported":[],"importedBy":[{"uid":"92598439-22"}]},"92598439-22":{"id":"/src/json.js","moduleParts":{"json.min.mjs":"92598439-23"},"imported":[{"uid":"92598439-30"},{"uid":"92598439-16"},{"uid":"92598439-18"},{"uid":"92598439-20"}],"importedBy":[{"uid":"92598439-28"}]},"92598439-24":{"id":"/src/utils/is-bigint.js","moduleParts":{"json.min.mjs":"92598439-25"},"imported":[],"importedBy":[{"uid":"92598439-28"}]},"92598439-26":{"id":"/src/utils/to-safe-number-or-throw.js","moduleParts":{"json.min.mjs":"92598439-27"},"imported":[{"uid":"92598439-12"},{"uid":"92598439-8"}],"importedBy":[{"uid":"92598439-28"}]},"92598439-28":{"id":"/src/index.js","moduleParts":{"json.min.mjs":"92598439-29"},"imported":[{"uid":"92598439-22"},{"uid":"92598439-14"},{"uid":"92598439-24"},{"uid":"92598439-4"},{"uid":"92598439-10"},{"uid":"92598439-8"},{"uid":"92598439-12"},{"uid":"92598439-26"}],"importedBy":[],"isEntry":true},"92598439-30":{"id":"/node_modules/json-custom-numbers/index.mjs","moduleParts":{},"imported":[{"uid":"92598439-0"},{"uid":"92598439-2"}],"importedBy":[{"uid":"92598439-22"}]},"92598439-31":{"id":"@babel/runtime/helpers/classCallCheck","moduleParts":{},"imported":[],"importedBy":[{"uid":"92598439-14"}],"isExternal":true},"92598439-32":{"id":"@babel/runtime/helpers/createClass","moduleParts":{},"imported":[],"importedBy":[{"uid":"92598439-14"}],"isExternal":true},"92598439-33":{"id":"@babel/runtime/helpers/defineProperty","moduleParts":{},"imported":[],"importedBy":[{"uid":"92598439-14"}],"isExternal":true}},"env":{"rollup":"4.29.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4932
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"json.min.mjs","children":[{"name":"node_modules/json-custom-numbers","children":[{"uid":"90e2db19-1","name":"parse.mjs"},{"uid":"90e2db19-3","name":"stringify.mjs"}]},{"name":"src","children":[{"name":"utils","children":[{"uid":"90e2db19-5","name":"is-integer.js"},{"uid":"90e2db19-7","name":"extract-significant-digits.js"},{"uid":"90e2db19-9","name":"is-number.js"},{"uid":"90e2db19-11","name":"is-safe-number.js"},{"uid":"90e2db19-13","name":"get-unsafe-reason.js"},{"uid":"90e2db19-15","name":"lossless-number.js"},{"uid":"90e2db19-25","name":"is-bigint.js"},{"uid":"90e2db19-27","name":"to-safe-number-or-throw.js"}]},{"uid":"90e2db19-17","name":"parse-number.js"},{"uid":"90e2db19-19","name":"format-number.js"},{"uid":"90e2db19-21","name":"collection-replacer.js"},{"uid":"90e2db19-23","name":"json.js"},{"uid":"90e2db19-29","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"90e2db19-1":{"renderedLength":5058,"gzipLength":2142,"brotliLength":1928,"metaUid":"90e2db19-0"},"90e2db19-3":{"renderedLength":2678,"gzipLength":1398,"brotliLength":1240,"metaUid":"90e2db19-2"},"90e2db19-5":{"renderedLength":669,"gzipLength":321,"brotliLength":274,"metaUid":"90e2db19-4"},"90e2db19-7":{"renderedLength":1065,"gzipLength":464,"brotliLength":388,"metaUid":"90e2db19-6"},"90e2db19-9":{"renderedLength":787,"gzipLength":408,"brotliLength":317,"metaUid":"90e2db19-8"},"90e2db19-11":{"renderedLength":3100,"gzipLength":1083,"brotliLength":861,"metaUid":"90e2db19-10"},"90e2db19-13":{"renderedLength":1108,"gzipLength":441,"brotliLength":365,"metaUid":"90e2db19-12"},"90e2db19-15":{"renderedLength":2673,"gzipLength":1033,"brotliLength":854,"metaUid":"90e2db19-14"},"90e2db19-17":{"renderedLength":834,"gzipLength":358,"brotliLength":290,"metaUid":"90e2db19-16"},"90e2db19-19":{"renderedLength":1045,"gzipLength":382,"brotliLength":321,"metaUid":"90e2db19-18"},"90e2db19-21":{"renderedLength":862,"gzipLength":340,"brotliLength":295,"metaUid":"90e2db19-20"},"90e2db19-23":{"renderedLength":904,"gzipLength":416,"brotliLength":327,"metaUid":"90e2db19-22"},"90e2db19-25":{"renderedLength":670,"gzipLength":324,"brotliLength":252,"metaUid":"90e2db19-24"},"90e2db19-27":{"renderedLength":1512,"gzipLength":636,"brotliLength":533,"metaUid":"90e2db19-26"},"90e2db19-29":{"renderedLength":264,"gzipLength":101,"brotliLength":98,"metaUid":"90e2db19-28"}},"nodeMetas":{"90e2db19-0":{"id":"/node_modules/json-custom-numbers/parse.mjs","moduleParts":{"json.min.mjs":"90e2db19-1"},"imported":[],"importedBy":[{"uid":"90e2db19-30"}]},"90e2db19-2":{"id":"/node_modules/json-custom-numbers/stringify.mjs","moduleParts":{"json.min.mjs":"90e2db19-3"},"imported":[],"importedBy":[{"uid":"90e2db19-30"}]},"90e2db19-4":{"id":"/src/utils/is-integer.js","moduleParts":{"json.min.mjs":"90e2db19-5"},"imported":[],"importedBy":[{"uid":"90e2db19-28"},{"uid":"90e2db19-10"},{"uid":"90e2db19-12"},{"uid":"90e2db19-16"}]},"90e2db19-6":{"id":"/src/utils/extract-significant-digits.js","moduleParts":{"json.min.mjs":"90e2db19-7"},"imported":[],"importedBy":[{"uid":"90e2db19-10"},{"uid":"90e2db19-12"}]},"90e2db19-8":{"id":"/src/utils/is-number.js","moduleParts":{"json.min.mjs":"90e2db19-9"},"imported":[],"importedBy":[{"uid":"90e2db19-28"},{"uid":"90e2db19-14"},{"uid":"90e2db19-10"}]},"90e2db19-10":{"id":"/src/utils/is-safe-number.js","moduleParts":{"json.min.mjs":"90e2db19-11"},"imported":[{"uid":"90e2db19-4"},{"uid":"90e2db19-6"},{"uid":"90e2db19-8"}],"importedBy":[{"uid":"90e2db19-28"},{"uid":"90e2db19-26"},{"uid":"90e2db19-16"}]},"90e2db19-12":{"id":"/src/utils/get-unsafe-reason.js","moduleParts":{"json.min.mjs":"90e2db19-13"},"imported":[{"uid":"90e2db19-4"},{"uid":"90e2db19-6"}],"importedBy":[{"uid":"90e2db19-28"},{"uid":"90e2db19-14"},{"uid":"90e2db19-26"}]},"90e2db19-14":{"id":"/src/utils/lossless-number.js","moduleParts":{"json.min.mjs":"90e2db19-15"},"imported":[{"uid":"90e2db19-31"},{"uid":"90e2db19-32"},{"uid":"90e2db19-33"},{"uid":"90e2db19-8"},{"uid":"90e2db19-12"}],"importedBy":[{"uid":"90e2db19-28"},{"uid":"90e2db19-16"},{"uid":"90e2db19-18"}]},"90e2db19-16":{"id":"/src/parse-number.js","moduleParts":{"json.min.mjs":"90e2db19-17"},"imported":[{"uid":"90e2db19-4"},{"uid":"90e2db19-10"},{"uid":"90e2db19-14"}],"importedBy":[{"uid":"90e2db19-22"}]},"90e2db19-18":{"id":"/src/format-number.js","moduleParts":{"json.min.mjs":"90e2db19-19"},"imported":[{"uid":"90e2db19-14"}],"importedBy":[{"uid":"90e2db19-22"}]},"90e2db19-20":{"id":"/src/collection-replacer.js","moduleParts":{"json.min.mjs":"90e2db19-21"},"imported":[],"importedBy":[{"uid":"90e2db19-22"}]},"90e2db19-22":{"id":"/src/json.js","moduleParts":{"json.min.mjs":"90e2db19-23"},"imported":[{"uid":"90e2db19-30"},{"uid":"90e2db19-16"},{"uid":"90e2db19-18"},{"uid":"90e2db19-20"}],"importedBy":[{"uid":"90e2db19-28"}]},"90e2db19-24":{"id":"/src/utils/is-bigint.js","moduleParts":{"json.min.mjs":"90e2db19-25"},"imported":[],"importedBy":[{"uid":"90e2db19-28"}]},"90e2db19-26":{"id":"/src/utils/to-safe-number-or-throw.js","moduleParts":{"json.min.mjs":"90e2db19-27"},"imported":[{"uid":"90e2db19-12"},{"uid":"90e2db19-10"}],"importedBy":[{"uid":"90e2db19-28"}]},"90e2db19-28":{"id":"/src/index.js","moduleParts":{"json.min.mjs":"90e2db19-29"},"imported":[{"uid":"90e2db19-22"},{"uid":"90e2db19-14"},{"uid":"90e2db19-24"},{"uid":"90e2db19-4"},{"uid":"90e2db19-8"},{"uid":"90e2db19-10"},{"uid":"90e2db19-12"},{"uid":"90e2db19-26"}],"importedBy":[],"isEntry":true},"90e2db19-30":{"id":"/node_modules/json-custom-numbers/index.mjs","moduleParts":{},"imported":[{"uid":"90e2db19-0"},{"uid":"90e2db19-2"}],"importedBy":[{"uid":"90e2db19-22"}]},"90e2db19-31":{"id":"@babel/runtime/helpers/classCallCheck","moduleParts":{},"imported":[],"importedBy":[{"uid":"90e2db19-14"}],"isExternal":true},"90e2db19-32":{"id":"@babel/runtime/helpers/createClass","moduleParts":{},"imported":[],"importedBy":[{"uid":"90e2db19-14"}],"isExternal":true},"90e2db19-33":{"id":"@babel/runtime/helpers/defineProperty","moduleParts":{},"imported":[],"importedBy":[{"uid":"90e2db19-14"}],"isExternal":true}},"env":{"rollup":"4.40.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
4929
4929
  </script>
4930
4930
  <script>
4931
4931
  /*<!--*/
4932
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"json.mjs","children":[{"name":"node_modules/json-custom-numbers","children":[{"uid":"33a7dc83-1","name":"parse.mjs"},{"uid":"33a7dc83-3","name":"stringify.mjs"}]},{"name":"src","children":[{"name":"utils","children":[{"uid":"33a7dc83-5","name":"is-integer.js"},{"uid":"33a7dc83-7","name":"extract-significant-digits.js"},{"uid":"33a7dc83-9","name":"is-safe-number.js"},{"uid":"33a7dc83-11","name":"is-number.js"},{"uid":"33a7dc83-13","name":"get-unsafe-reason.js"},{"uid":"33a7dc83-15","name":"lossless-number.js"},{"uid":"33a7dc83-25","name":"is-bigint.js"},{"uid":"33a7dc83-27","name":"to-safe-number-or-throw.js"}]},{"uid":"33a7dc83-17","name":"parse-number.js"},{"uid":"33a7dc83-19","name":"format-number.js"},{"uid":"33a7dc83-21","name":"collection-replacer.js"},{"uid":"33a7dc83-23","name":"json.js"},{"uid":"33a7dc83-29","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"33a7dc83-1":{"renderedLength":5022,"gzipLength":2137,"brotliLength":1921,"metaUid":"33a7dc83-0"},"33a7dc83-3":{"renderedLength":2649,"gzipLength":1397,"brotliLength":1235,"metaUid":"33a7dc83-2"},"33a7dc83-5":{"renderedLength":669,"gzipLength":321,"brotliLength":274,"metaUid":"33a7dc83-4"},"33a7dc83-7":{"renderedLength":1065,"gzipLength":464,"brotliLength":388,"metaUid":"33a7dc83-6"},"33a7dc83-9":{"renderedLength":2397,"gzipLength":912,"brotliLength":718,"metaUid":"33a7dc83-8"},"33a7dc83-11":{"renderedLength":787,"gzipLength":408,"brotliLength":317,"metaUid":"33a7dc83-10"},"33a7dc83-13":{"renderedLength":1108,"gzipLength":441,"brotliLength":365,"metaUid":"33a7dc83-12"},"33a7dc83-15":{"renderedLength":2673,"gzipLength":1033,"brotliLength":854,"metaUid":"33a7dc83-14"},"33a7dc83-17":{"renderedLength":834,"gzipLength":358,"brotliLength":290,"metaUid":"33a7dc83-16"},"33a7dc83-19":{"renderedLength":1045,"gzipLength":382,"brotliLength":321,"metaUid":"33a7dc83-18"},"33a7dc83-21":{"renderedLength":862,"gzipLength":340,"brotliLength":295,"metaUid":"33a7dc83-20"},"33a7dc83-23":{"renderedLength":904,"gzipLength":416,"brotliLength":327,"metaUid":"33a7dc83-22"},"33a7dc83-25":{"renderedLength":670,"gzipLength":324,"brotliLength":252,"metaUid":"33a7dc83-24"},"33a7dc83-27":{"renderedLength":1512,"gzipLength":636,"brotliLength":533,"metaUid":"33a7dc83-26"},"33a7dc83-29":{"renderedLength":263,"gzipLength":100,"brotliLength":97,"metaUid":"33a7dc83-28"}},"nodeMetas":{"33a7dc83-0":{"id":"/node_modules/json-custom-numbers/parse.mjs","moduleParts":{"json.mjs":"33a7dc83-1"},"imported":[],"importedBy":[{"uid":"33a7dc83-30"}]},"33a7dc83-2":{"id":"/node_modules/json-custom-numbers/stringify.mjs","moduleParts":{"json.mjs":"33a7dc83-3"},"imported":[],"importedBy":[{"uid":"33a7dc83-30"}]},"33a7dc83-4":{"id":"/src/utils/is-integer.js","moduleParts":{"json.mjs":"33a7dc83-5"},"imported":[],"importedBy":[{"uid":"33a7dc83-28"},{"uid":"33a7dc83-8"},{"uid":"33a7dc83-12"},{"uid":"33a7dc83-16"}]},"33a7dc83-6":{"id":"/src/utils/extract-significant-digits.js","moduleParts":{"json.mjs":"33a7dc83-7"},"imported":[],"importedBy":[{"uid":"33a7dc83-8"},{"uid":"33a7dc83-12"}]},"33a7dc83-8":{"id":"/src/utils/is-safe-number.js","moduleParts":{"json.mjs":"33a7dc83-9"},"imported":[{"uid":"33a7dc83-4"},{"uid":"33a7dc83-6"}],"importedBy":[{"uid":"33a7dc83-28"},{"uid":"33a7dc83-26"},{"uid":"33a7dc83-16"}]},"33a7dc83-10":{"id":"/src/utils/is-number.js","moduleParts":{"json.mjs":"33a7dc83-11"},"imported":[],"importedBy":[{"uid":"33a7dc83-28"},{"uid":"33a7dc83-14"}]},"33a7dc83-12":{"id":"/src/utils/get-unsafe-reason.js","moduleParts":{"json.mjs":"33a7dc83-13"},"imported":[{"uid":"33a7dc83-4"},{"uid":"33a7dc83-6"}],"importedBy":[{"uid":"33a7dc83-28"},{"uid":"33a7dc83-14"},{"uid":"33a7dc83-26"}]},"33a7dc83-14":{"id":"/src/utils/lossless-number.js","moduleParts":{"json.mjs":"33a7dc83-15"},"imported":[{"uid":"33a7dc83-31"},{"uid":"33a7dc83-32"},{"uid":"33a7dc83-33"},{"uid":"33a7dc83-10"},{"uid":"33a7dc83-12"}],"importedBy":[{"uid":"33a7dc83-28"},{"uid":"33a7dc83-16"},{"uid":"33a7dc83-18"}]},"33a7dc83-16":{"id":"/src/parse-number.js","moduleParts":{"json.mjs":"33a7dc83-17"},"imported":[{"uid":"33a7dc83-4"},{"uid":"33a7dc83-8"},{"uid":"33a7dc83-14"}],"importedBy":[{"uid":"33a7dc83-22"}]},"33a7dc83-18":{"id":"/src/format-number.js","moduleParts":{"json.mjs":"33a7dc83-19"},"imported":[{"uid":"33a7dc83-14"}],"importedBy":[{"uid":"33a7dc83-22"}]},"33a7dc83-20":{"id":"/src/collection-replacer.js","moduleParts":{"json.mjs":"33a7dc83-21"},"imported":[],"importedBy":[{"uid":"33a7dc83-22"}]},"33a7dc83-22":{"id":"/src/json.js","moduleParts":{"json.mjs":"33a7dc83-23"},"imported":[{"uid":"33a7dc83-30"},{"uid":"33a7dc83-16"},{"uid":"33a7dc83-18"},{"uid":"33a7dc83-20"}],"importedBy":[{"uid":"33a7dc83-28"}]},"33a7dc83-24":{"id":"/src/utils/is-bigint.js","moduleParts":{"json.mjs":"33a7dc83-25"},"imported":[],"importedBy":[{"uid":"33a7dc83-28"}]},"33a7dc83-26":{"id":"/src/utils/to-safe-number-or-throw.js","moduleParts":{"json.mjs":"33a7dc83-27"},"imported":[{"uid":"33a7dc83-12"},{"uid":"33a7dc83-8"}],"importedBy":[{"uid":"33a7dc83-28"}]},"33a7dc83-28":{"id":"/src/index.js","moduleParts":{"json.mjs":"33a7dc83-29"},"imported":[{"uid":"33a7dc83-22"},{"uid":"33a7dc83-14"},{"uid":"33a7dc83-24"},{"uid":"33a7dc83-4"},{"uid":"33a7dc83-10"},{"uid":"33a7dc83-8"},{"uid":"33a7dc83-12"},{"uid":"33a7dc83-26"}],"importedBy":[],"isEntry":true},"33a7dc83-30":{"id":"/node_modules/json-custom-numbers/index.mjs","moduleParts":{},"imported":[{"uid":"33a7dc83-0"},{"uid":"33a7dc83-2"}],"importedBy":[{"uid":"33a7dc83-22"}]},"33a7dc83-31":{"id":"@babel/runtime/helpers/classCallCheck","moduleParts":{},"imported":[],"importedBy":[{"uid":"33a7dc83-14"}],"isExternal":true},"33a7dc83-32":{"id":"@babel/runtime/helpers/createClass","moduleParts":{},"imported":[],"importedBy":[{"uid":"33a7dc83-14"}],"isExternal":true},"33a7dc83-33":{"id":"@babel/runtime/helpers/defineProperty","moduleParts":{},"imported":[],"importedBy":[{"uid":"33a7dc83-14"}],"isExternal":true}},"env":{"rollup":"4.29.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4932
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"json.mjs","children":[{"name":"node_modules/json-custom-numbers","children":[{"uid":"361047d1-1","name":"parse.mjs"},{"uid":"361047d1-3","name":"stringify.mjs"}]},{"name":"src","children":[{"name":"utils","children":[{"uid":"361047d1-5","name":"is-integer.js"},{"uid":"361047d1-7","name":"extract-significant-digits.js"},{"uid":"361047d1-9","name":"is-number.js"},{"uid":"361047d1-11","name":"is-safe-number.js"},{"uid":"361047d1-13","name":"get-unsafe-reason.js"},{"uid":"361047d1-15","name":"lossless-number.js"},{"uid":"361047d1-25","name":"is-bigint.js"},{"uid":"361047d1-27","name":"to-safe-number-or-throw.js"}]},{"uid":"361047d1-17","name":"parse-number.js"},{"uid":"361047d1-19","name":"format-number.js"},{"uid":"361047d1-21","name":"collection-replacer.js"},{"uid":"361047d1-23","name":"json.js"},{"uid":"361047d1-29","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"361047d1-1":{"renderedLength":5058,"gzipLength":2142,"brotliLength":1928,"metaUid":"361047d1-0"},"361047d1-3":{"renderedLength":2678,"gzipLength":1398,"brotliLength":1240,"metaUid":"361047d1-2"},"361047d1-5":{"renderedLength":669,"gzipLength":321,"brotliLength":274,"metaUid":"361047d1-4"},"361047d1-7":{"renderedLength":1065,"gzipLength":464,"brotliLength":388,"metaUid":"361047d1-6"},"361047d1-9":{"renderedLength":787,"gzipLength":408,"brotliLength":317,"metaUid":"361047d1-8"},"361047d1-11":{"renderedLength":3100,"gzipLength":1083,"brotliLength":861,"metaUid":"361047d1-10"},"361047d1-13":{"renderedLength":1108,"gzipLength":441,"brotliLength":365,"metaUid":"361047d1-12"},"361047d1-15":{"renderedLength":2673,"gzipLength":1033,"brotliLength":854,"metaUid":"361047d1-14"},"361047d1-17":{"renderedLength":834,"gzipLength":358,"brotliLength":290,"metaUid":"361047d1-16"},"361047d1-19":{"renderedLength":1045,"gzipLength":382,"brotliLength":321,"metaUid":"361047d1-18"},"361047d1-21":{"renderedLength":862,"gzipLength":340,"brotliLength":295,"metaUid":"361047d1-20"},"361047d1-23":{"renderedLength":904,"gzipLength":416,"brotliLength":327,"metaUid":"361047d1-22"},"361047d1-25":{"renderedLength":670,"gzipLength":324,"brotliLength":252,"metaUid":"361047d1-24"},"361047d1-27":{"renderedLength":1512,"gzipLength":636,"brotliLength":533,"metaUid":"361047d1-26"},"361047d1-29":{"renderedLength":263,"gzipLength":100,"brotliLength":97,"metaUid":"361047d1-28"}},"nodeMetas":{"361047d1-0":{"id":"/node_modules/json-custom-numbers/parse.mjs","moduleParts":{"json.mjs":"361047d1-1"},"imported":[],"importedBy":[{"uid":"361047d1-30"}]},"361047d1-2":{"id":"/node_modules/json-custom-numbers/stringify.mjs","moduleParts":{"json.mjs":"361047d1-3"},"imported":[],"importedBy":[{"uid":"361047d1-30"}]},"361047d1-4":{"id":"/src/utils/is-integer.js","moduleParts":{"json.mjs":"361047d1-5"},"imported":[],"importedBy":[{"uid":"361047d1-28"},{"uid":"361047d1-10"},{"uid":"361047d1-12"},{"uid":"361047d1-16"}]},"361047d1-6":{"id":"/src/utils/extract-significant-digits.js","moduleParts":{"json.mjs":"361047d1-7"},"imported":[],"importedBy":[{"uid":"361047d1-10"},{"uid":"361047d1-12"}]},"361047d1-8":{"id":"/src/utils/is-number.js","moduleParts":{"json.mjs":"361047d1-9"},"imported":[],"importedBy":[{"uid":"361047d1-28"},{"uid":"361047d1-14"},{"uid":"361047d1-10"}]},"361047d1-10":{"id":"/src/utils/is-safe-number.js","moduleParts":{"json.mjs":"361047d1-11"},"imported":[{"uid":"361047d1-4"},{"uid":"361047d1-6"},{"uid":"361047d1-8"}],"importedBy":[{"uid":"361047d1-28"},{"uid":"361047d1-26"},{"uid":"361047d1-16"}]},"361047d1-12":{"id":"/src/utils/get-unsafe-reason.js","moduleParts":{"json.mjs":"361047d1-13"},"imported":[{"uid":"361047d1-4"},{"uid":"361047d1-6"}],"importedBy":[{"uid":"361047d1-28"},{"uid":"361047d1-14"},{"uid":"361047d1-26"}]},"361047d1-14":{"id":"/src/utils/lossless-number.js","moduleParts":{"json.mjs":"361047d1-15"},"imported":[{"uid":"361047d1-31"},{"uid":"361047d1-32"},{"uid":"361047d1-33"},{"uid":"361047d1-8"},{"uid":"361047d1-12"}],"importedBy":[{"uid":"361047d1-28"},{"uid":"361047d1-16"},{"uid":"361047d1-18"}]},"361047d1-16":{"id":"/src/parse-number.js","moduleParts":{"json.mjs":"361047d1-17"},"imported":[{"uid":"361047d1-4"},{"uid":"361047d1-10"},{"uid":"361047d1-14"}],"importedBy":[{"uid":"361047d1-22"}]},"361047d1-18":{"id":"/src/format-number.js","moduleParts":{"json.mjs":"361047d1-19"},"imported":[{"uid":"361047d1-14"}],"importedBy":[{"uid":"361047d1-22"}]},"361047d1-20":{"id":"/src/collection-replacer.js","moduleParts":{"json.mjs":"361047d1-21"},"imported":[],"importedBy":[{"uid":"361047d1-22"}]},"361047d1-22":{"id":"/src/json.js","moduleParts":{"json.mjs":"361047d1-23"},"imported":[{"uid":"361047d1-30"},{"uid":"361047d1-16"},{"uid":"361047d1-18"},{"uid":"361047d1-20"}],"importedBy":[{"uid":"361047d1-28"}]},"361047d1-24":{"id":"/src/utils/is-bigint.js","moduleParts":{"json.mjs":"361047d1-25"},"imported":[],"importedBy":[{"uid":"361047d1-28"}]},"361047d1-26":{"id":"/src/utils/to-safe-number-or-throw.js","moduleParts":{"json.mjs":"361047d1-27"},"imported":[{"uid":"361047d1-12"},{"uid":"361047d1-10"}],"importedBy":[{"uid":"361047d1-28"}]},"361047d1-28":{"id":"/src/index.js","moduleParts":{"json.mjs":"361047d1-29"},"imported":[{"uid":"361047d1-22"},{"uid":"361047d1-14"},{"uid":"361047d1-24"},{"uid":"361047d1-4"},{"uid":"361047d1-8"},{"uid":"361047d1-10"},{"uid":"361047d1-12"},{"uid":"361047d1-26"}],"importedBy":[],"isEntry":true},"361047d1-30":{"id":"/node_modules/json-custom-numbers/index.mjs","moduleParts":{},"imported":[{"uid":"361047d1-0"},{"uid":"361047d1-2"}],"importedBy":[{"uid":"361047d1-22"}]},"361047d1-31":{"id":"@babel/runtime/helpers/classCallCheck","moduleParts":{},"imported":[],"importedBy":[{"uid":"361047d1-14"}],"isExternal":true},"361047d1-32":{"id":"@babel/runtime/helpers/createClass","moduleParts":{},"imported":[],"importedBy":[{"uid":"361047d1-14"}],"isExternal":true},"361047d1-33":{"id":"@babel/runtime/helpers/defineProperty","moduleParts":{},"imported":[],"importedBy":[{"uid":"361047d1-14"}],"isExternal":true}},"env":{"rollup":"4.40.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qubit-ltd/json",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "A JavaScript library for parsing and formatting JSON data.",
5
5
  "author": "Haixing Hu",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,9 @@
42
42
  "lint": "eslint ./src",
43
43
  "doc": "jsdoc -c jsdoc.json",
44
44
  "es5": "check-es-version -e 5 -s true",
45
- "deploy": "npm run lint && npm run test && npm run build:all && npm publish --registry='https://registry.npmjs.com/' --access public"
45
+ "deploy": "npm run lint && npm run test && npm run build:all && npm publish --registry='https://npm.qubit.ltd/' --access public",
46
+ "deploy:public": "npm run lint && npm run test && npm run build:all && npm publish --registry='https://registry.npmjs.org/' --access public",
47
+ "deploy:all": "npm run deploy && npm publish --registry='https://registry.npmjs.org/' --access public"
46
48
  },
47
49
  "dependencies": {
48
50
  "json-custom-numbers": "^3.1.1"
@@ -51,26 +53,26 @@
51
53
  "@babel/runtime": "^7.26.0"
52
54
  },
53
55
  "devDependencies": {
54
- "@babel/core": "^7.26.0",
55
- "@babel/eslint-parser": "^7.25.9",
56
+ "@babel/core": "^7.26.10",
57
+ "@babel/eslint-parser": "^7.27.0",
56
58
  "@babel/plugin-proposal-decorators": "^7.25.9",
57
59
  "@babel/plugin-transform-class-properties": "^7.25.9",
58
- "@babel/plugin-transform-runtime": "^7.25.9",
59
- "@babel/preset-env": "^7.26.0",
60
- "@babel/runtime": "^7.26.0",
60
+ "@babel/plugin-transform-runtime": "^7.26.10",
61
+ "@babel/preset-env": "^7.26.9",
62
+ "@babel/runtime": "^7.27.0",
61
63
  "@jest/core": "^29.7.0",
62
64
  "@qubit-ltd/eslint-config": "^1.3.4",
63
65
  "@qubit-ltd/jsdoc-minami": "^1.5.2",
64
- "@qubit-ltd/rollup-builder": "^1.8.7",
66
+ "@qubit-ltd/rollup-builder": "^1.8.9",
65
67
  "@rollup/plugin-alias": "^5.1.1",
66
68
  "@rollup/plugin-babel": "^6.0.4",
67
- "@rollup/plugin-commonjs": "^25.0.8",
69
+ "@rollup/plugin-commonjs": "^28.0.3",
68
70
  "@rollup/plugin-json": "^6.1.0",
69
- "@rollup/plugin-node-resolve": "^15.3.1",
71
+ "@rollup/plugin-node-resolve": "^16.0.1",
70
72
  "@rollup/plugin-terser": "^0.4.4",
71
73
  "babel-jest": "^29.7.0",
72
- "check-es-version": "^1.5.0",
73
- "core-js": "^3.39.0",
74
+ "check-es-version": "^1.5.1",
75
+ "core-js": "^3.41.0",
74
76
  "cross-env": "^7.0.3",
75
77
  "eslint": "^8.57.1",
76
78
  "eslint-plugin-import": "^2.31.0",
@@ -79,9 +81,9 @@
79
81
  "jest-environment-jsdom-global": "^4.0.0",
80
82
  "jest-extended": "^4.0.2",
81
83
  "jsdoc": "^4.0.4",
82
- "rollup": "^4.29.1",
84
+ "rollup": "^4.40.0",
83
85
  "rollup-plugin-analyzer": "^4.0.0",
84
- "rollup-plugin-visualizer": "^5.13.1"
86
+ "rollup-plugin-visualizer": "^5.14.0"
85
87
  },
86
88
  "packageManager": "yarn@4.5.0"
87
89
  }