mcbe-leveldb 1.0.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.
package/utils/JSONB.js ADDED
@@ -0,0 +1,348 @@
1
+ /**
2
+ * JSONB.ts
3
+ * An improved version of {@link JSON}
4
+ * @module
5
+ * @description This file contains the `JSONB` class.
6
+ * @author 8Crafter
7
+ */
8
+ // This version of the JSONB class is modified to not be on globalThis.
9
+ /**
10
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
11
+ *
12
+ * This is an improved version of {@link JSON}.
13
+ *
14
+ * @author 8Crafter
15
+ */
16
+ export const JSONB = {};
17
+ (function () {
18
+ "use strict";
19
+ /**
20
+ * Asserts that a value is not `undefined` or `null`.
21
+ *
22
+ * @template T The type of the value to check.
23
+ * @param {T} value The value to check.
24
+ * @returns {asserts value is NonNullable<T>} Asserts that the value is not `undefined` or `null`.
25
+ *
26
+ * @throws {Error} If the value is `undefined` or `null`.
27
+ */
28
+ function assertIsDefined(value) {
29
+ if (value === undefined || value === null) {
30
+ throw new Error(`${value} is not defined`);
31
+ }
32
+ }
33
+ var rx_one = /^[\],:{}\s]*$/;
34
+ var rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
35
+ var rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
36
+ var rx_four = /(?:^|:|,)(?:\s*\[)+/g;
37
+ var rx_escapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
38
+ var rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
39
+ function f(n) {
40
+ // Format integers to have at least two digits.
41
+ return n < 10 ? "0" + n : n;
42
+ }
43
+ function this_value() {
44
+ return this.valueOf();
45
+ }
46
+ if (typeof Date.prototype.toJSON !== "function") {
47
+ Date.prototype.toJSON = function () {
48
+ return isFinite(this.valueOf())
49
+ ? this.getUTCFullYear() +
50
+ "-" +
51
+ f(this.getUTCMonth() + 1) +
52
+ "-" +
53
+ f(this.getUTCDate()) +
54
+ "T" +
55
+ f(this.getUTCHours()) +
56
+ ":" +
57
+ f(this.getUTCMinutes()) +
58
+ ":" +
59
+ f(this.getUTCSeconds()) +
60
+ "Z"
61
+ : null;
62
+ }; /*
63
+
64
+ Boolean.prototype.toJSON = this_value;
65
+ Number.prototype.toJSON = this_value;
66
+ String.prototype.toJSON = this_value;*/
67
+ }
68
+ var gap;
69
+ var indent;
70
+ var meta;
71
+ var rep;
72
+ function quote(string) {
73
+ // If the string contains no control characters, no quote characters, and no
74
+ // backslash characters, then we can safely slap some quotes around it.
75
+ // Otherwise we must also replace the offending characters with safe escape
76
+ // sequences.
77
+ rx_escapable.lastIndex = 0;
78
+ return rx_escapable.test(string)
79
+ ? '"' +
80
+ string.replace(rx_escapable, function (a) {
81
+ var c = meta[a];
82
+ return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
83
+ }) +
84
+ '"'
85
+ : '"' + string + '"';
86
+ }
87
+ function str(key, holder, options) {
88
+ // Produce a string from holder[key].
89
+ var i; // The loop counter.
90
+ var k; // The member key.
91
+ var v; // The member value.
92
+ var length;
93
+ var mind = gap;
94
+ var partial;
95
+ var value = holder[key];
96
+ if (options?.get) {
97
+ if (Object.hasOwn(holder, "__lookupGetter__") ? !!holder?.__lookupGetter__(key) : false) {
98
+ if (options.set) {
99
+ if (!!holder.__lookupSetter__(key)) {
100
+ value = { get: holder.__lookupGetter__(key), set: holder.__lookupSetter__(key) };
101
+ }
102
+ else {
103
+ value = { get: holder.__lookupGetter__(key) };
104
+ }
105
+ }
106
+ else {
107
+ value = { get: holder.__lookupGetter__(key) };
108
+ }
109
+ }
110
+ else if (options.set) {
111
+ if (Object.hasOwn(holder, "__lookupSetter__") ? !!holder.__lookupSetter__(key) : false) {
112
+ value = { set: holder.__lookupSetter__(key) };
113
+ }
114
+ }
115
+ }
116
+ else if (options?.set) {
117
+ if (Object.hasOwn(holder, "__lookupSetter__") ? !!holder.__lookupSetter__(key) : false) {
118
+ value = { set: holder.__lookupSetter__(key) };
119
+ }
120
+ } /*
121
+
122
+ // If the value is an instance of the Decimal or Decimal2 class, convert it to decimal type.
123
+
124
+ if (
125
+ value
126
+ && typeof value === "object"
127
+ && typeof value.toJSONB === "function"
128
+ ) {
129
+ value = value.toJSONB(key);
130
+ } */
131
+ // If the value has a toJSONB or toJSON method, call it to obtain a replacement value.
132
+ if (value && typeof value === "object" && typeof value.toJSONB === "function") {
133
+ value = value.toJSONB(key);
134
+ }
135
+ else if (value && typeof value === "object" && typeof value.toJSON === "function") {
136
+ value = value.toJSON(key);
137
+ }
138
+ // If we were called with a replacer function, then call the replacer to
139
+ // obtain a replacement value.
140
+ if (typeof rep === "function") {
141
+ value = rep.call(holder, key.toString(), value);
142
+ }
143
+ // What happens next depends on the value's type.
144
+ switch (typeof value) {
145
+ case "string":
146
+ return quote(value);
147
+ case "number":
148
+ // JSONB numbers must be finite. Encode non-finite numbers as null.
149
+ return isFinite(value)
150
+ ? String(value)
151
+ : value == Infinity
152
+ ? options?.Infinity ?? true
153
+ ? "Infinity"
154
+ : "null"
155
+ : value == -Infinity
156
+ ? options?.NegativeInfinity ?? true
157
+ ? "-Infinity"
158
+ : "null"
159
+ : Number.isNaN(value)
160
+ ? options?.NaN ?? true
161
+ ? "NaN"
162
+ : "null"
163
+ : "null";
164
+ case "bigint":
165
+ return options?.bigint ?? true ? String(value) + "n" : "null";
166
+ case "undefined":
167
+ return options?.undefined ?? true ? "undefined" : undefined;
168
+ case "function":
169
+ return options?.function ?? false ? value.toString() : undefined;
170
+ case "boolean":
171
+ // @ts-ignore
172
+ case "null":
173
+ // If the value is a boolean or null, convert it to a string. Note:
174
+ // typeof null does not produce "null". The case is included here in
175
+ // the remote chance that this gets fixed someday.
176
+ return String(value);
177
+ // If the type is "object", we might be dealing with an object or an array or
178
+ // null.
179
+ case "object":
180
+ // Due to a specification blunder in ECMAScript, typeof null is "object",
181
+ // so watch out for that case.
182
+ if (!value) {
183
+ return "null";
184
+ }
185
+ // Make an array to hold the partial results of stringifying this object value.
186
+ gap += indent;
187
+ partial = [];
188
+ // Is the value an array?
189
+ if (Object.prototype.toString.apply(value) === "[object Array]") {
190
+ // The value is an array. Stringify every element. Use null as a placeholder
191
+ // for non-JSONB values.
192
+ length = value.length;
193
+ for (i = 0; i < length; i += 1) {
194
+ partial[i] = str(i, value, options) || "null";
195
+ }
196
+ // Join all of the elements together, separated with commas, and wrap them in
197
+ // brackets.
198
+ v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]";
199
+ gap = mind;
200
+ return v;
201
+ }
202
+ // If the replacer is an array, use it to select the members to be stringified.
203
+ if (rep && typeof rep === "object") {
204
+ length = rep.length;
205
+ for (i = 0; i < length; i += 1) {
206
+ if (typeof rep[i] === "string") {
207
+ k = rep[i];
208
+ v = str(k, value, options);
209
+ if (v) {
210
+ partial.push(quote(k.toString()) + (gap ? ": " : ":") + v);
211
+ }
212
+ }
213
+ }
214
+ }
215
+ else {
216
+ // Otherwise, iterate through all of the keys in the object.
217
+ for (k in value) {
218
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
219
+ v = str(k, value, options);
220
+ if (v) {
221
+ partial.push(quote(k) + (gap ? ": " : ":") + v);
222
+ }
223
+ }
224
+ }
225
+ }
226
+ // Join all of the member texts together, separated with commas,
227
+ // and wrap them in braces.
228
+ v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}";
229
+ gap = mind;
230
+ return v;
231
+ }
232
+ }
233
+ // If the JSONB object does not yet have a stringify method, give it one.
234
+ if (typeof JSONB.stringify !== "function") {
235
+ meta = {
236
+ // table of character substitutions
237
+ "\b": "\\b",
238
+ "\t": "\\t",
239
+ "\n": "\\n",
240
+ "\f": "\\f",
241
+ "\r": "\\r",
242
+ '"': '\\"',
243
+ "\\": "\\\\",
244
+ };
245
+ JSONB.stringify = function (value, replacer, space, options = { bigint: true, undefined: true, Infinity: true, NegativeInfinity: true, NaN: true, get: false, set: false, function: false, class: false }) {
246
+ // The stringify method takes a value and an optional replacer, and an optional
247
+ // space parameter, and returns a JSONB text. The replacer can be a function
248
+ // that can replace values, or an array of strings that will select the keys.
249
+ // A default replacer method can be provided. Use of the space parameter can
250
+ // produce text that is more easily readable.
251
+ var i;
252
+ gap = "";
253
+ indent = "";
254
+ // If the space parameter is a number, make an indent string containing that
255
+ // many spaces.
256
+ if (typeof space === "number") {
257
+ for (i = 0; i < space; i += 1) {
258
+ indent += " ";
259
+ }
260
+ // If the space parameter is a string, it will be used as the indent string.
261
+ }
262
+ else if (typeof space === "string") {
263
+ indent = space;
264
+ }
265
+ // If there is a replacer, it must be a function or an array.
266
+ // Otherwise, throw an error.
267
+ rep = replacer;
268
+ if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) {
269
+ throw new SyntaxError("Invalid Replacer");
270
+ }
271
+ // Make a fake root object containing our value under the key of "".
272
+ // Return the result of stringifying the value.
273
+ return str("", { "": value }, options);
274
+ };
275
+ }
276
+ // If the JSONB object does not yet have a parse method, give it one.
277
+ if (typeof JSONB.parse !== "function") {
278
+ JSONB.parse = function (text, reviver, options = { bigint: true, undefined: true, Infinity: true, NegativeInfinity: true, NaN: true, get: false, set: false, function: false, class: false }) {
279
+ // The parse method takes a text and an optional reviver function, and returns
280
+ // a JavaScript value if the text is a valid JSONB text.
281
+ var j;
282
+ var rx_three_b = RegExp(`"[^"\\\\\\n\\r]*"|true|false|null|${options.undefined ?? true ? "undefined|" : ""}${options.Infinity ?? true ? "Infinity|" : ""}${options.NegativeInfinity ?? true ? "-Infinity|" : ""}${options.NaN ?? true ? "NaN|" : ""}-?\\d+${options.bigint ?? true ? `(?:n|(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)` : `(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?`}`, "g");
283
+ function walk(holder, key) {
284
+ assertIsDefined(reviver);
285
+ // The walk method is used to recursively walk the resulting structure so
286
+ // that modifications can be made.
287
+ var k;
288
+ var v;
289
+ var value = holder[key];
290
+ if (value && typeof value === "object") {
291
+ for (k in value) {
292
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
293
+ v = walk(value, k);
294
+ if (v !== undefined) {
295
+ value[k] = v;
296
+ }
297
+ else {
298
+ delete value[k];
299
+ }
300
+ }
301
+ }
302
+ }
303
+ return reviver.call(holder, key, value);
304
+ }
305
+ // Parsing happens in four stages. In the first stage, we replace certain
306
+ // Unicode characters with escape sequences. JavaScript handles many characters
307
+ // incorrectly, either silently deleting them, or treating them as line endings.
308
+ text = String(text);
309
+ rx_dangerous.lastIndex = 0;
310
+ if (rx_dangerous.test(text)) {
311
+ text = text.replace(rx_dangerous, function (a) {
312
+ return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
313
+ });
314
+ }
315
+ // In the second stage, we run the text against regular expressions that look
316
+ // for non-JSONB patterns. We are especially concerned with "()" and "new"
317
+ // because they can cause invocation, and "=" because it can cause mutation.
318
+ // But just to be safe, we want to reject all unexpected forms.
319
+ // We split the second stage into 4 regexp operations in order to work around
320
+ // crippling inefficiencies in IE's and Safari's regexp engines. First we
321
+ // replace the JSONB backslash pairs with "@" (a non-JSONB character). Second, we
322
+ // replace all simple value tokens with "]" characters. Third, we delete all
323
+ // open brackets that follow a colon or comma or that begin the text. Finally,
324
+ // we look to see that the remaining characters are only whitespace or "]" or
325
+ // "," or ":" or "{" or "}". If that is so, then the text is safe for eval.
326
+ /* console.log(
327
+ text
328
+ .replace(rx_two, "@")
329
+ .replace(rx_three_b, "]")
330
+ .replace(rx_four, "")
331
+ ) */
332
+ if (rx_one.test(text.replace(rx_two, "@").replace(rx_three_b, "]").replace(rx_four, ""))) {
333
+ // In the third stage we use the eval function to compile the text into a
334
+ // JavaScript structure. The "{" operator is subject to a syntactic ambiguity
335
+ // in JavaScript: it can begin a block or an object literal. We wrap the text
336
+ // in parens to eliminate the ambiguity.
337
+ j = eval("(" + text + ")");
338
+ // In the optional fourth stage, we recursively walk the new structure, passing
339
+ // each name/value pair to a reviver function for possible transformation.
340
+ return typeof reviver === "function" ? walk({ "": j }, "") : j;
341
+ }
342
+ // If the text is not JSONB parseable, then a SyntaxError is thrown.
343
+ throw new SyntaxError("JSONB.parse");
344
+ };
345
+ }
346
+ })();
347
+ // globalThis.JSONB = JSONB;
348
+ //# sourceMappingURL=JSONB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JSONB.js","sourceRoot":"","sources":["JSONB.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uEAAuE;AAEvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAU,EAAS,CAAC;AAkItC,CAAC;IACG,YAAY,CAAC;IAEb;;;;;;;;OAQG;IACH,SAAS,eAAe,CAAI,KAAQ;QAChC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,iBAAiB,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAED,IAAI,MAAM,GAAG,eAAe,CAAC;IAC7B,IAAI,MAAM,GAAG,qCAAqC,CAAC;IACnD,IAAI,QAAQ,GAAG,kEAAkE,CAAC;IAClF,IAAI,OAAO,GAAG,sBAAsB,CAAC;IACrC,IAAI,YAAY,GAAG,iIAAiI,CAAC;IACrJ,IAAI,YAAY,GAAG,0GAA0G,CAAC;IAE9H,SAAS,CAAC,CAAC,CAAS;QAChB,+CAA+C;QAC/C,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC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