@eredzik/calaminejs 0.1.0 → 0.1.1

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.
@@ -0,0 +1,612 @@
1
+ let wasm;
2
+
3
+ let WASM_VECTOR_LEN = 0;
4
+
5
+ let cachedUint8ArrayMemory0 = null;
6
+
7
+ function getUint8ArrayMemory0() {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
+ }
11
+ return cachedUint8ArrayMemory0;
12
+ }
13
+
14
+ const cachedTextEncoder = new TextEncoder();
15
+
16
+ if (!('encodeInto' in cachedTextEncoder)) {
17
+ cachedTextEncoder.encodeInto = function (arg, view) {
18
+ const buf = cachedTextEncoder.encode(arg);
19
+ view.set(buf);
20
+ return {
21
+ read: arg.length,
22
+ written: buf.length
23
+ };
24
+ }
25
+ }
26
+
27
+ function passStringToWasm0(arg, malloc, realloc) {
28
+
29
+ if (realloc === undefined) {
30
+ const buf = cachedTextEncoder.encode(arg);
31
+ const ptr = malloc(buf.length, 1) >>> 0;
32
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
33
+ WASM_VECTOR_LEN = buf.length;
34
+ return ptr;
35
+ }
36
+
37
+ let len = arg.length;
38
+ let ptr = malloc(len, 1) >>> 0;
39
+
40
+ const mem = getUint8ArrayMemory0();
41
+
42
+ let offset = 0;
43
+
44
+ for (; offset < len; offset++) {
45
+ const code = arg.charCodeAt(offset);
46
+ if (code > 0x7F) break;
47
+ mem[ptr + offset] = code;
48
+ }
49
+
50
+ if (offset !== len) {
51
+ if (offset !== 0) {
52
+ arg = arg.slice(offset);
53
+ }
54
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
55
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
56
+ const ret = cachedTextEncoder.encodeInto(arg, view);
57
+
58
+ offset += ret.written;
59
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
60
+ }
61
+
62
+ WASM_VECTOR_LEN = offset;
63
+ return ptr;
64
+ }
65
+
66
+ function isLikeNone(x) {
67
+ return x === undefined || x === null;
68
+ }
69
+
70
+ let cachedDataViewMemory0 = null;
71
+
72
+ function getDataViewMemory0() {
73
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
74
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
75
+ }
76
+ return cachedDataViewMemory0;
77
+ }
78
+
79
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
80
+
81
+ cachedTextDecoder.decode();
82
+
83
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
84
+ let numBytesDecoded = 0;
85
+ function decodeText(ptr, len) {
86
+ numBytesDecoded += len;
87
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
88
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
89
+ cachedTextDecoder.decode();
90
+ numBytesDecoded = len;
91
+ }
92
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
93
+ }
94
+
95
+ function getStringFromWasm0(ptr, len) {
96
+ ptr = ptr >>> 0;
97
+ return decodeText(ptr, len);
98
+ }
99
+
100
+ function addToExternrefTable0(obj) {
101
+ const idx = wasm.__externref_table_alloc();
102
+ wasm.__wbindgen_externrefs.set(idx, obj);
103
+ return idx;
104
+ }
105
+
106
+ function handleError(f, args) {
107
+ try {
108
+ return f.apply(this, args);
109
+ } catch (e) {
110
+ const idx = addToExternrefTable0(e);
111
+ wasm.__wbindgen_exn_store(idx);
112
+ }
113
+ }
114
+
115
+ function getArrayU8FromWasm0(ptr, len) {
116
+ ptr = ptr >>> 0;
117
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
118
+ }
119
+
120
+ function takeFromExternrefTable0(idx) {
121
+ const value = wasm.__wbindgen_externrefs.get(idx);
122
+ wasm.__externref_table_dealloc(idx);
123
+ return value;
124
+ }
125
+
126
+ function passArrayJsValueToWasm0(array, malloc) {
127
+ const ptr = malloc(array.length * 4, 4) >>> 0;
128
+ for (let i = 0; i < array.length; i++) {
129
+ const add = addToExternrefTable0(array[i]);
130
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
131
+ }
132
+ WASM_VECTOR_LEN = array.length;
133
+ return ptr;
134
+ }
135
+
136
+ function passArray8ToWasm0(arg, malloc) {
137
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
138
+ getUint8ArrayMemory0().set(arg, ptr / 1);
139
+ WASM_VECTOR_LEN = arg.length;
140
+ return ptr;
141
+ }
142
+
143
+ const CellValueFinalization = (typeof FinalizationRegistry === 'undefined')
144
+ ? { register: () => {}, unregister: () => {} }
145
+ : new FinalizationRegistry(ptr => wasm.__wbg_cellvalue_free(ptr >>> 0, 1));
146
+
147
+ export class CellValue {
148
+
149
+ static __wrap(ptr) {
150
+ ptr = ptr >>> 0;
151
+ const obj = Object.create(CellValue.prototype);
152
+ obj.__wbg_ptr = ptr;
153
+ CellValueFinalization.register(obj, obj.__wbg_ptr, obj);
154
+ return obj;
155
+ }
156
+
157
+ __destroy_into_raw() {
158
+ const ptr = this.__wbg_ptr;
159
+ this.__wbg_ptr = 0;
160
+ CellValueFinalization.unregister(this);
161
+ return ptr;
162
+ }
163
+
164
+ free() {
165
+ const ptr = this.__destroy_into_raw();
166
+ wasm.__wbg_cellvalue_free(ptr, 0);
167
+ }
168
+ /**
169
+ * @returns {boolean}
170
+ */
171
+ get is_datetime() {
172
+ const ret = wasm.cellvalue_is_datetime(this.__wbg_ptr);
173
+ return ret !== 0;
174
+ }
175
+ /**
176
+ * @returns {boolean}
177
+ */
178
+ get is_duration() {
179
+ const ret = wasm.cellvalue_is_duration(this.__wbg_ptr);
180
+ return ret !== 0;
181
+ }
182
+ /**
183
+ * @returns {bigint | undefined}
184
+ */
185
+ to_int_value() {
186
+ const ret = wasm.cellvalue_to_int_value(this.__wbg_ptr);
187
+ return ret[0] === 0 ? undefined : ret[1];
188
+ }
189
+ /**
190
+ * @returns {boolean | undefined}
191
+ */
192
+ to_bool_value() {
193
+ const ret = wasm.cellvalue_to_bool_value(this.__wbg_ptr);
194
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
195
+ }
196
+ /**
197
+ * @returns {number | undefined}
198
+ */
199
+ to_float_value() {
200
+ const ret = wasm.cellvalue_to_float_value(this.__wbg_ptr);
201
+ return ret[0] === 0 ? undefined : ret[1];
202
+ }
203
+ /**
204
+ * @returns {string | undefined}
205
+ */
206
+ to_string_value() {
207
+ const ret = wasm.cellvalue_to_string_value(this.__wbg_ptr);
208
+ let v1;
209
+ if (ret[0] !== 0) {
210
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
211
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
212
+ }
213
+ return v1;
214
+ }
215
+ /**
216
+ * @returns {boolean}
217
+ */
218
+ get is_int() {
219
+ const ret = wasm.cellvalue_is_int(this.__wbg_ptr);
220
+ return ret !== 0;
221
+ }
222
+ /**
223
+ * @returns {boolean}
224
+ */
225
+ get is_bool() {
226
+ const ret = wasm.cellvalue_is_bool(this.__wbg_ptr);
227
+ return ret !== 0;
228
+ }
229
+ /**
230
+ * @returns {boolean}
231
+ */
232
+ get is_empty() {
233
+ const ret = wasm.cellvalue_is_empty(this.__wbg_ptr);
234
+ return ret !== 0;
235
+ }
236
+ /**
237
+ * @returns {boolean}
238
+ */
239
+ get is_error() {
240
+ const ret = wasm.cellvalue_is_error(this.__wbg_ptr);
241
+ return ret !== 0;
242
+ }
243
+ /**
244
+ * @returns {boolean}
245
+ */
246
+ get is_float() {
247
+ const ret = wasm.cellvalue_is_float(this.__wbg_ptr);
248
+ return ret !== 0;
249
+ }
250
+ /**
251
+ * @returns {boolean}
252
+ */
253
+ get is_string() {
254
+ const ret = wasm.cellvalue_is_string(this.__wbg_ptr);
255
+ return ret !== 0;
256
+ }
257
+ }
258
+ if (Symbol.dispose) CellValue.prototype[Symbol.dispose] = CellValue.prototype.free;
259
+
260
+ const SheetFinalization = (typeof FinalizationRegistry === 'undefined')
261
+ ? { register: () => {}, unregister: () => {} }
262
+ : new FinalizationRegistry(ptr => wasm.__wbg_sheet_free(ptr >>> 0, 1));
263
+
264
+ export class Sheet {
265
+
266
+ static __wrap(ptr) {
267
+ ptr = ptr >>> 0;
268
+ const obj = Object.create(Sheet.prototype);
269
+ obj.__wbg_ptr = ptr;
270
+ SheetFinalization.register(obj, obj.__wbg_ptr, obj);
271
+ return obj;
272
+ }
273
+
274
+ __destroy_into_raw() {
275
+ const ptr = this.__wbg_ptr;
276
+ this.__wbg_ptr = 0;
277
+ SheetFinalization.unregister(this);
278
+ return ptr;
279
+ }
280
+
281
+ free() {
282
+ const ptr = this.__destroy_into_raw();
283
+ wasm.__wbg_sheet_free(ptr, 0);
284
+ }
285
+ /**
286
+ * Convert sheet to Parquet format
287
+ * Returns the Parquet file as bytes
288
+ * @returns {Uint8Array}
289
+ */
290
+ to_parquet() {
291
+ const ret = wasm.sheet_to_parquet(this.__wbg_ptr);
292
+ if (ret[3]) {
293
+ throw takeFromExternrefTable0(ret[2]);
294
+ }
295
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
296
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
297
+ return v1;
298
+ }
299
+ /**
300
+ * Convert sheet to Parquet format with custom column names
301
+ * column_names: array of column names (must match col_count)
302
+ * @param {string[]} column_names
303
+ * @returns {Uint8Array}
304
+ */
305
+ to_parquet_with_names(column_names) {
306
+ const ptr0 = passArrayJsValueToWasm0(column_names, wasm.__wbindgen_malloc);
307
+ const len0 = WASM_VECTOR_LEN;
308
+ const ret = wasm.sheet_to_parquet_with_names(this.__wbg_ptr, ptr0, len0);
309
+ if (ret[3]) {
310
+ throw takeFromExternrefTable0(ret[2]);
311
+ }
312
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
313
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
314
+ return v2;
315
+ }
316
+ /**
317
+ * @returns {string}
318
+ */
319
+ get name() {
320
+ let deferred1_0;
321
+ let deferred1_1;
322
+ try {
323
+ const ret = wasm.sheet_name(this.__wbg_ptr);
324
+ deferred1_0 = ret[0];
325
+ deferred1_1 = ret[1];
326
+ return getStringFromWasm0(ret[0], ret[1]);
327
+ } finally {
328
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
329
+ }
330
+ }
331
+ /**
332
+ * @returns {Array<any>}
333
+ */
334
+ get rows() {
335
+ const ret = wasm.sheet_rows(this.__wbg_ptr);
336
+ return ret;
337
+ }
338
+ /**
339
+ * @param {number} row
340
+ * @param {number} col
341
+ * @returns {CellValue | undefined}
342
+ */
343
+ get_cell(row, col) {
344
+ const ret = wasm.sheet_get_cell(this.__wbg_ptr, row, col);
345
+ return ret === 0 ? undefined : CellValue.__wrap(ret);
346
+ }
347
+ /**
348
+ * @returns {number}
349
+ */
350
+ col_count() {
351
+ const ret = wasm.sheet_col_count(this.__wbg_ptr);
352
+ return ret >>> 0;
353
+ }
354
+ /**
355
+ * @returns {number}
356
+ */
357
+ row_count() {
358
+ const ret = wasm.sheet_row_count(this.__wbg_ptr);
359
+ return ret >>> 0;
360
+ }
361
+ }
362
+ if (Symbol.dispose) Sheet.prototype[Symbol.dispose] = Sheet.prototype.free;
363
+
364
+ const WorkbookFinalization = (typeof FinalizationRegistry === 'undefined')
365
+ ? { register: () => {}, unregister: () => {} }
366
+ : new FinalizationRegistry(ptr => wasm.__wbg_workbook_free(ptr >>> 0, 1));
367
+
368
+ export class Workbook {
369
+
370
+ static __wrap(ptr) {
371
+ ptr = ptr >>> 0;
372
+ const obj = Object.create(Workbook.prototype);
373
+ obj.__wbg_ptr = ptr;
374
+ WorkbookFinalization.register(obj, obj.__wbg_ptr, obj);
375
+ return obj;
376
+ }
377
+
378
+ __destroy_into_raw() {
379
+ const ptr = this.__wbg_ptr;
380
+ this.__wbg_ptr = 0;
381
+ WorkbookFinalization.unregister(this);
382
+ return ptr;
383
+ }
384
+
385
+ free() {
386
+ const ptr = this.__destroy_into_raw();
387
+ wasm.__wbg_workbook_free(ptr, 0);
388
+ }
389
+ /**
390
+ * @param {Uint8Array} data
391
+ * @returns {Workbook}
392
+ */
393
+ static from_bytes(data) {
394
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
395
+ const len0 = WASM_VECTOR_LEN;
396
+ const ret = wasm.workbook_from_bytes(ptr0, len0);
397
+ if (ret[2]) {
398
+ throw takeFromExternrefTable0(ret[1]);
399
+ }
400
+ return Workbook.__wrap(ret[0]);
401
+ }
402
+ /**
403
+ * @returns {number}
404
+ */
405
+ sheet_count() {
406
+ const ret = wasm.workbook_sheet_count(this.__wbg_ptr);
407
+ return ret >>> 0;
408
+ }
409
+ /**
410
+ * @returns {Array<any>}
411
+ */
412
+ sheet_names() {
413
+ const ret = wasm.workbook_sheet_names(this.__wbg_ptr);
414
+ return ret;
415
+ }
416
+ /**
417
+ * @param {number} index
418
+ * @returns {Sheet | undefined}
419
+ */
420
+ get_sheet_by_index(index) {
421
+ const ret = wasm.workbook_get_sheet_by_index(this.__wbg_ptr, index);
422
+ return ret === 0 ? undefined : Sheet.__wrap(ret);
423
+ }
424
+ /**
425
+ * @param {Uint8Array} data
426
+ * @param {Function | null} [progress_callback]
427
+ * @param {number | null} [progress_interval]
428
+ * @returns {Workbook}
429
+ */
430
+ static from_bytes_with_progress(data, progress_callback, progress_interval) {
431
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
432
+ const len0 = WASM_VECTOR_LEN;
433
+ const ret = wasm.workbook_from_bytes_with_progress(ptr0, len0, isLikeNone(progress_callback) ? 0 : addToExternrefTable0(progress_callback), isLikeNone(progress_interval) ? 0x100000001 : (progress_interval) >>> 0);
434
+ if (ret[2]) {
435
+ throw takeFromExternrefTable0(ret[1]);
436
+ }
437
+ return Workbook.__wrap(ret[0]);
438
+ }
439
+ /**
440
+ * @param {string} name
441
+ * @returns {Sheet | undefined}
442
+ */
443
+ get_sheet(name) {
444
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
+ const len0 = WASM_VECTOR_LEN;
446
+ const ret = wasm.workbook_get_sheet(this.__wbg_ptr, ptr0, len0);
447
+ return ret === 0 ? undefined : Sheet.__wrap(ret);
448
+ }
449
+ }
450
+ if (Symbol.dispose) Workbook.prototype[Symbol.dispose] = Workbook.prototype.free;
451
+
452
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
453
+
454
+ async function __wbg_load(module, imports) {
455
+ if (typeof Response === 'function' && module instanceof Response) {
456
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
457
+ try {
458
+ return await WebAssembly.instantiateStreaming(module, imports);
459
+
460
+ } catch (e) {
461
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
462
+
463
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
464
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
465
+
466
+ } else {
467
+ throw e;
468
+ }
469
+ }
470
+ }
471
+
472
+ const bytes = await module.arrayBuffer();
473
+ return await WebAssembly.instantiate(bytes, imports);
474
+
475
+ } else {
476
+ const instance = await WebAssembly.instantiate(module, imports);
477
+
478
+ if (instance instanceof WebAssembly.Instance) {
479
+ return { instance, module };
480
+
481
+ } else {
482
+ return instance;
483
+ }
484
+ }
485
+ }
486
+
487
+ function __wbg_get_imports() {
488
+ const imports = {};
489
+ imports.wbg = {};
490
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
491
+ const obj = arg1;
492
+ const ret = typeof(obj) === 'string' ? obj : undefined;
493
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
494
+ var len1 = WASM_VECTOR_LEN;
495
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
496
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
497
+ };
498
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
499
+ throw new Error(getStringFromWasm0(arg0, arg1));
500
+ };
501
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
502
+ const ret = arg0.call(arg1, arg2);
503
+ return ret;
504
+ }, arguments) };
505
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
506
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
507
+ }, arguments) };
508
+ imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
509
+ console.log(arg0);
510
+ };
511
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
512
+ const ret = new Object();
513
+ return ret;
514
+ };
515
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
516
+ const ret = new Array();
517
+ return ret;
518
+ };
519
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
520
+ const ret = arg0.push(arg1);
521
+ return ret;
522
+ };
523
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
524
+ const ret = Reflect.set(arg0, arg1, arg2);
525
+ return ret;
526
+ }, arguments) };
527
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
528
+ // Cast intrinsic for `Ref(String) -> Externref`.
529
+ const ret = getStringFromWasm0(arg0, arg1);
530
+ return ret;
531
+ };
532
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
533
+ // Cast intrinsic for `F64 -> Externref`.
534
+ const ret = arg0;
535
+ return ret;
536
+ };
537
+ imports.wbg.__wbindgen_init_externref_table = function() {
538
+ const table = wasm.__wbindgen_externrefs;
539
+ const offset = table.grow(4);
540
+ table.set(0, undefined);
541
+ table.set(offset + 0, undefined);
542
+ table.set(offset + 1, null);
543
+ table.set(offset + 2, true);
544
+ table.set(offset + 3, false);
545
+ ;
546
+ };
547
+
548
+ return imports;
549
+ }
550
+
551
+ function __wbg_finalize_init(instance, module) {
552
+ wasm = instance.exports;
553
+ __wbg_init.__wbindgen_wasm_module = module;
554
+ cachedDataViewMemory0 = null;
555
+ cachedUint8ArrayMemory0 = null;
556
+
557
+
558
+ wasm.__wbindgen_start();
559
+ return wasm;
560
+ }
561
+
562
+ function initSync(module) {
563
+ if (wasm !== undefined) return wasm;
564
+
565
+
566
+ if (typeof module !== 'undefined') {
567
+ if (Object.getPrototypeOf(module) === Object.prototype) {
568
+ ({module} = module)
569
+ } else {
570
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
571
+ }
572
+ }
573
+
574
+ const imports = __wbg_get_imports();
575
+
576
+ if (!(module instanceof WebAssembly.Module)) {
577
+ module = new WebAssembly.Module(module);
578
+ }
579
+
580
+ const instance = new WebAssembly.Instance(module, imports);
581
+
582
+ return __wbg_finalize_init(instance, module);
583
+ }
584
+
585
+ async function __wbg_init(module_or_path) {
586
+ if (wasm !== undefined) return wasm;
587
+
588
+
589
+ if (typeof module_or_path !== 'undefined') {
590
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
591
+ ({module_or_path} = module_or_path)
592
+ } else {
593
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
594
+ }
595
+ }
596
+
597
+ if (typeof module_or_path === 'undefined') {
598
+ module_or_path = new URL('calamine_js_bg.wasm', import.meta.url);
599
+ }
600
+ const imports = __wbg_get_imports();
601
+
602
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
603
+ module_or_path = fetch(module_or_path);
604
+ }
605
+
606
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
607
+
608
+ return __wbg_finalize_init(instance, module);
609
+ }
610
+
611
+ export { initSync };
612
+ export default __wbg_init;
Binary file
@@ -0,0 +1,54 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_cellvalue_free: (a: number, b: number) => void;
5
+ export const __wbg_sheet_free: (a: number, b: number) => void;
6
+ export const __wbg_workbook_free: (a: number, b: number) => void;
7
+ export const cellvalue_is_bool: (a: number) => number;
8
+ export const cellvalue_is_datetime: (a: number) => number;
9
+ export const cellvalue_is_duration: (a: number) => number;
10
+ export const cellvalue_is_empty: (a: number) => number;
11
+ export const cellvalue_is_error: (a: number) => number;
12
+ export const cellvalue_is_float: (a: number) => number;
13
+ export const cellvalue_is_int: (a: number) => number;
14
+ export const cellvalue_is_string: (a: number) => number;
15
+ export const cellvalue_to_bool_value: (a: number) => number;
16
+ export const cellvalue_to_float_value: (a: number) => [number, number];
17
+ export const cellvalue_to_int_value: (a: number) => [number, bigint];
18
+ export const cellvalue_to_string_value: (a: number) => [number, number];
19
+ export const sheet_col_count: (a: number) => number;
20
+ export const sheet_get_cell: (a: number, b: number, c: number) => number;
21
+ export const sheet_name: (a: number) => [number, number];
22
+ export const sheet_row_count: (a: number) => number;
23
+ export const sheet_rows: (a: number) => any;
24
+ export const sheet_to_parquet: (a: number) => [number, number, number, number];
25
+ export const sheet_to_parquet_with_names: (a: number, b: number, c: number) => [number, number, number, number];
26
+ export const workbook_from_bytes: (a: number, b: number) => [number, number, number];
27
+ export const workbook_from_bytes_with_progress: (a: number, b: number, c: number, d: number) => [number, number, number];
28
+ export const workbook_get_sheet: (a: number, b: number, c: number) => number;
29
+ export const workbook_get_sheet_by_index: (a: number, b: number) => number;
30
+ export const workbook_sheet_count: (a: number) => number;
31
+ export const workbook_sheet_names: (a: number) => any;
32
+ export const rust_lz4_wasm_shim_calloc: (a: number, b: number) => number;
33
+ export const rust_lz4_wasm_shim_free: (a: number) => void;
34
+ export const rust_lz4_wasm_shim_malloc: (a: number) => number;
35
+ export const rust_lz4_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
36
+ export const rust_lz4_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
37
+ export const rust_lz4_wasm_shim_memmove: (a: number, b: number, c: number) => number;
38
+ export const rust_lz4_wasm_shim_memset: (a: number, b: number, c: number) => number;
39
+ export const rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
40
+ export const rust_zstd_wasm_shim_free: (a: number) => void;
41
+ export const rust_zstd_wasm_shim_malloc: (a: number) => number;
42
+ export const rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
43
+ export const rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
44
+ export const rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
45
+ export const rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
46
+ export const rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
47
+ export const __wbindgen_malloc: (a: number, b: number) => number;
48
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
49
+ export const __wbindgen_exn_store: (a: number) => void;
50
+ export const __externref_table_alloc: () => number;
51
+ export const __wbindgen_externrefs: WebAssembly.Table;
52
+ export const __externref_table_dealloc: (a: number) => void;
53
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
54
+ export const __wbindgen_start: () => void;