@json-eval-rs/bundler 0.0.48 → 0.0.49

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.49",
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",
@@ -1,9 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Get the library version
5
- */
6
- export function getVersion(): string;
7
3
  /**
8
4
  * Initialize the library (sets up panic hook)
9
5
  */
@@ -12,6 +8,10 @@ export function init(): void;
12
8
  * Get library version (alias)
13
9
  */
14
10
  export function version(): string;
11
+ /**
12
+ * Get the library version
13
+ */
14
+ export function getVersion(): string;
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
  }
@@ -218,10 +153,17 @@ function passArrayJsValueToWasm0(array, malloc) {
218
153
  return ptr;
219
154
  }
220
155
  /**
221
- * Get the library version
156
+ * Initialize the library (sets up panic hook)
157
+ */
158
+ export function init() {
159
+ wasm.init();
160
+ }
161
+
162
+ /**
163
+ * Get library version (alias)
222
164
  * @returns {string}
223
165
  */
224
- export function getVersion() {
166
+ export function version() {
225
167
  let deferred1_0;
226
168
  let deferred1_1;
227
169
  try {
@@ -239,17 +181,10 @@ export function getVersion() {
239
181
  }
240
182
 
241
183
  /**
242
- * Initialize the library (sets up panic hook)
243
- */
244
- export function init() {
245
- wasm.init();
246
- }
247
-
248
- /**
249
- * Get library version (alias)
184
+ * Get the library version
250
185
  * @returns {string}
251
186
  */
252
- export function version() {
187
+ export function getVersion() {
253
188
  let deferred1_0;
254
189
  let deferred1_1;
255
190
  try {
@@ -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_bb412d517df4ef42(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