@json-eval-rs/node 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/node",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "description": "JSON Eval RS for Node.js and Server-Side Rendering 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
  */
@@ -129,71 +129,6 @@ function takeObject(idx) {
129
129
  return ret;
130
130
  }
131
131
 
132
- function debugString(val) {
133
- // primitive types
134
- const type = typeof val;
135
- if (type == 'number' || type == 'boolean' || val == null) {
136
- return `${val}`;
137
- }
138
- if (type == 'string') {
139
- return `"${val}"`;
140
- }
141
- if (type == 'symbol') {
142
- const description = val.description;
143
- if (description == null) {
144
- return 'Symbol';
145
- } else {
146
- return `Symbol(${description})`;
147
- }
148
- }
149
- if (type == 'function') {
150
- const name = val.name;
151
- if (typeof name == 'string' && name.length > 0) {
152
- return `Function(${name})`;
153
- } else {
154
- return 'Function';
155
- }
156
- }
157
- // objects
158
- if (Array.isArray(val)) {
159
- const length = val.length;
160
- let debug = '[';
161
- if (length > 0) {
162
- debug += debugString(val[0]);
163
- }
164
- for(let i = 1; i < length; i++) {
165
- debug += ', ' + debugString(val[i]);
166
- }
167
- debug += ']';
168
- return debug;
169
- }
170
- // Test for built-in
171
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
172
- let className;
173
- if (builtInMatches && builtInMatches.length > 1) {
174
- className = builtInMatches[1];
175
- } else {
176
- // Failed to match the standard '[object ClassName]'
177
- return toString.call(val);
178
- }
179
- if (className == 'Object') {
180
- // we're a user defined class or Object
181
- // JSON.stringify avoids problems with cycles, and is generally much
182
- // easier than looping through ownProperties of `val`.
183
- try {
184
- return 'Object(' + JSON.stringify(val) + ')';
185
- } catch (_) {
186
- return 'Object';
187
- }
188
- }
189
- // errors
190
- if (val instanceof Error) {
191
- return `${val.name}: ${val.message}\n${val.stack}`;
192
- }
193
- // TODO we could test for more things here, like `Set`s and `Map`s.
194
- return className;
195
- }
196
-
197
132
  function isLikeNone(x) {
198
133
  return x === undefined || x === null;
199
134
  }
@@ -208,10 +143,17 @@ function passArrayJsValueToWasm0(array, malloc) {
208
143
  return ptr;
209
144
  }
210
145
  /**
211
- * Get the library version
146
+ * Initialize the library (sets up panic hook)
147
+ */
148
+ exports.init = function() {
149
+ wasm.init();
150
+ };
151
+
152
+ /**
153
+ * Get library version (alias)
212
154
  * @returns {string}
213
155
  */
214
- exports.getVersion = function() {
156
+ exports.version = function() {
215
157
  let deferred1_0;
216
158
  let deferred1_1;
217
159
  try {
@@ -229,17 +171,10 @@ exports.getVersion = function() {
229
171
  };
230
172
 
231
173
  /**
232
- * Initialize the library (sets up panic hook)
233
- */
234
- exports.init = function() {
235
- wasm.init();
236
- };
237
-
238
- /**
239
- * Get library version (alias)
174
+ * Get the library version
240
175
  * @returns {string}
241
176
  */
242
- exports.version = function() {
177
+ exports.getVersion = function() {
243
178
  let deferred1_0;
244
179
  let deferred1_1;
245
180
  try {
@@ -2176,7 +2111,7 @@ exports.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
2176
2111
  return ret;
2177
2112
  };
2178
2113
 
2179
- exports.__wbg_log_335f2dafcd729af1 = function(arg0, arg1) {
2114
+ exports.__wbg_log_bb412d517df4ef42 = function(arg0, arg1) {
2180
2115
  console.log(getStringFromWasm0(arg0, arg1));
2181
2116
  };
2182
2117
 
@@ -2205,11 +2140,6 @@ exports.__wbg_new_8a6f238a6ece86ea = function() {
2205
2140
  return addHeapObject(ret);
2206
2141
  };
2207
2142
 
2208
- exports.__wbg_parse_442f5ba02e5eaf8b = function() { return handleError(function (arg0, arg1) {
2209
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2210
- return addHeapObject(ret);
2211
- }, arguments) };
2212
-
2213
2143
  exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2214
2144
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2215
2145
  };
@@ -2236,14 +2166,6 @@ exports.__wbg_validationerror_new = function(arg0) {
2236
2166
  return addHeapObject(ret);
2237
2167
  };
2238
2168
 
2239
- exports.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
2240
- const ret = debugString(getObject(arg1));
2241
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2242
- const len1 = WASM_VECTOR_LEN;
2243
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2244
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2245
- };
2246
-
2247
2169
  exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
2248
2170
  const ret = typeof(getObject(arg0)) === 'string';
2249
2171
  return ret;
Binary file