@json-eval-rs/bundler 0.0.48 → 0.0.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/bundler",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "description": "JSON Eval RS for bundlers (Webpack, Vite, Next.js, etc.) with ergonomic API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,14 +4,14 @@
4
4
  * Get the library version
5
5
  */
6
6
  export function getVersion(): string;
7
- /**
8
- * Initialize the library (sets up panic hook)
9
- */
10
- export function init(): void;
11
7
  /**
12
8
  * Get library version (alias)
13
9
  */
14
10
  export function version(): string;
11
+ /**
12
+ * Initialize the library (sets up panic hook)
13
+ */
14
+ export function init(): void;
15
15
  /**
16
16
  * WebAssembly wrapper for JSONEval
17
17
  */
@@ -139,71 +139,6 @@ function takeObject(idx) {
139
139
  return ret;
140
140
  }
141
141
 
142
- function debugString(val) {
143
- // primitive types
144
- const type = typeof val;
145
- if (type == 'number' || type == 'boolean' || val == null) {
146
- return `${val}`;
147
- }
148
- if (type == 'string') {
149
- return `"${val}"`;
150
- }
151
- if (type == 'symbol') {
152
- const description = val.description;
153
- if (description == null) {
154
- return 'Symbol';
155
- } else {
156
- return `Symbol(${description})`;
157
- }
158
- }
159
- if (type == 'function') {
160
- const name = val.name;
161
- if (typeof name == 'string' && name.length > 0) {
162
- return `Function(${name})`;
163
- } else {
164
- return 'Function';
165
- }
166
- }
167
- // objects
168
- if (Array.isArray(val)) {
169
- const length = val.length;
170
- let debug = '[';
171
- if (length > 0) {
172
- debug += debugString(val[0]);
173
- }
174
- for(let i = 1; i < length; i++) {
175
- debug += ', ' + debugString(val[i]);
176
- }
177
- debug += ']';
178
- return debug;
179
- }
180
- // Test for built-in
181
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
182
- let className;
183
- if (builtInMatches && builtInMatches.length > 1) {
184
- className = builtInMatches[1];
185
- } else {
186
- // Failed to match the standard '[object ClassName]'
187
- return toString.call(val);
188
- }
189
- if (className == 'Object') {
190
- // we're a user defined class or Object
191
- // JSON.stringify avoids problems with cycles, and is generally much
192
- // easier than looping through ownProperties of `val`.
193
- try {
194
- return 'Object(' + JSON.stringify(val) + ')';
195
- } catch (_) {
196
- return 'Object';
197
- }
198
- }
199
- // errors
200
- if (val instanceof Error) {
201
- return `${val.name}: ${val.message}\n${val.stack}`;
202
- }
203
- // TODO we could test for more things here, like `Set`s and `Map`s.
204
- return className;
205
- }
206
-
207
142
  function isLikeNone(x) {
208
143
  return x === undefined || x === null;
209
144
  }
@@ -238,13 +173,6 @@ export function getVersion() {
238
173
  }
239
174
  }
240
175
 
241
- /**
242
- * Initialize the library (sets up panic hook)
243
- */
244
- export function init() {
245
- wasm.init();
246
- }
247
-
248
176
  /**
249
177
  * Get library version (alias)
250
178
  * @returns {string}
@@ -266,6 +194,13 @@ export function version() {
266
194
  }
267
195
  }
268
196
 
197
+ /**
198
+ * Initialize the library (sets up panic hook)
199
+ */
200
+ export function init() {
201
+ wasm.init();
202
+ }
203
+
269
204
  function passArray8ToWasm0(arg, malloc) {
270
205
  const ptr = malloc(arg.length * 1, 1) >>> 0;
271
206
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -2180,7 +2115,7 @@ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
2180
2115
  return ret;
2181
2116
  };
2182
2117
 
2183
- export function __wbg_log_335f2dafcd729af1(arg0, arg1) {
2118
+ export function __wbg_log_7ecc2e908f5170d8(arg0, arg1) {
2184
2119
  console.log(getStringFromWasm0(arg0, arg1));
2185
2120
  };
2186
2121
 
@@ -2209,11 +2144,6 @@ export function __wbg_new_8a6f238a6ece86ea() {
2209
2144
  return addHeapObject(ret);
2210
2145
  };
2211
2146
 
2212
- export function __wbg_parse_442f5ba02e5eaf8b() { return handleError(function (arg0, arg1) {
2213
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2214
- return addHeapObject(ret);
2215
- }, arguments) };
2216
-
2217
2147
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
2218
2148
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2219
2149
  };
@@ -2240,14 +2170,6 @@ export function __wbg_validationerror_new(arg0) {
2240
2170
  return addHeapObject(ret);
2241
2171
  };
2242
2172
 
2243
- export function __wbg_wbindgendebugstring_99ef257a3ddda34d(arg0, arg1) {
2244
- const ret = debugString(getObject(arg1));
2245
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2246
- const len1 = WASM_VECTOR_LEN;
2247
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2248
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2249
- };
2250
-
2251
2173
  export function __wbg_wbindgenisstring_d4fa939789f003b0(arg0) {
2252
2174
  const ret = typeof(getObject(arg0)) === 'string';
2253
2175
  return ret;
Binary file