rregex 1.5.0 → 1.6.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/lib/browser.d.ts +13 -4
- package/lib/browser.js +142 -98
- package/lib/commonjs.d.ts +2 -2
- package/lib/commonjs.js +105 -87
- package/lib/module.d.ts +2 -2
- package/lib/module.js +102 -84
- package/lib/rregex.wasm +0 -0
- package/lib/rregex.wasm.d.ts +2 -2
- package/lib/types.d.ts +13 -4
- package/package.json +1 -1
package/lib/module.js
CHANGED
|
@@ -26,12 +26,12 @@ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true
|
|
|
26
26
|
|
|
27
27
|
cachedTextDecoder.decode();
|
|
28
28
|
|
|
29
|
-
let
|
|
29
|
+
let cachedUint8Memory0;
|
|
30
30
|
function getUint8Memory0() {
|
|
31
|
-
if (
|
|
32
|
-
|
|
31
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
|
32
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return cachedUint8Memory0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function getStringFromWasm0(ptr, len) {
|
|
@@ -108,12 +108,12 @@ function isLikeNone(x) {
|
|
|
108
108
|
return x === undefined || x === null;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
let
|
|
111
|
+
let cachedInt32Memory0;
|
|
112
112
|
function getInt32Memory0() {
|
|
113
|
-
if (
|
|
114
|
-
|
|
113
|
+
if (cachedInt32Memory0.byteLength === 0) {
|
|
114
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return cachedInt32Memory0;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
function debugString(val) {
|
|
@@ -187,8 +187,8 @@ function debugString(val) {
|
|
|
187
187
|
export function escape(text) {
|
|
188
188
|
try {
|
|
189
189
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
191
|
+
const len0 = WASM_VECTOR_LEN;
|
|
192
192
|
wasm.escape(retptr, ptr0, len0);
|
|
193
193
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
194
194
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -244,10 +244,21 @@ export class RRegex {
|
|
|
244
244
|
* @param {string} re
|
|
245
245
|
*/
|
|
246
246
|
constructor(re) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
try {
|
|
248
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
249
|
+
const ptr0 = passStringToWasm0(re, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
250
|
+
const len0 = WASM_VECTOR_LEN;
|
|
251
|
+
wasm.rregex_new(retptr, ptr0, len0);
|
|
252
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
253
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
254
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
255
|
+
if (r2) {
|
|
256
|
+
throw takeObject(r1);
|
|
257
|
+
}
|
|
258
|
+
return RRegex.__wrap(r0);
|
|
259
|
+
} finally {
|
|
260
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
261
|
+
}
|
|
251
262
|
}
|
|
252
263
|
/**
|
|
253
264
|
* Returns true if and only if there is a match for the regex in the string given.
|
|
@@ -257,9 +268,9 @@ export class RRegex {
|
|
|
257
268
|
* @returns {boolean}
|
|
258
269
|
*/
|
|
259
270
|
isMatch(text) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
271
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
273
|
+
const ret = wasm.rregex_isMatch(this.ptr, ptr0, len0);
|
|
263
274
|
return ret !== 0;
|
|
264
275
|
}
|
|
265
276
|
/**
|
|
@@ -271,9 +282,9 @@ export class RRegex {
|
|
|
271
282
|
* @returns {boolean}
|
|
272
283
|
*/
|
|
273
284
|
isMatchAt(text, start) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
285
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
286
|
+
const len0 = WASM_VECTOR_LEN;
|
|
287
|
+
const ret = wasm.rregex_isMatchAt(this.ptr, ptr0, len0, start);
|
|
277
288
|
return ret !== 0;
|
|
278
289
|
}
|
|
279
290
|
/**
|
|
@@ -284,9 +295,9 @@ export class RRegex {
|
|
|
284
295
|
* @returns {any}
|
|
285
296
|
*/
|
|
286
297
|
find(text) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
298
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
299
|
+
const len0 = WASM_VECTOR_LEN;
|
|
300
|
+
const ret = wasm.rregex_find(this.ptr, ptr0, len0);
|
|
290
301
|
return takeObject(ret);
|
|
291
302
|
}
|
|
292
303
|
/**
|
|
@@ -298,9 +309,9 @@ export class RRegex {
|
|
|
298
309
|
* @returns {any}
|
|
299
310
|
*/
|
|
300
311
|
findAt(text, start) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
312
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
313
|
+
const len0 = WASM_VECTOR_LEN;
|
|
314
|
+
const ret = wasm.rregex_findAt(this.ptr, ptr0, len0, start);
|
|
304
315
|
return takeObject(ret);
|
|
305
316
|
}
|
|
306
317
|
/**
|
|
@@ -310,9 +321,9 @@ export class RRegex {
|
|
|
310
321
|
* @returns {any}
|
|
311
322
|
*/
|
|
312
323
|
findAll(text) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
324
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
325
|
+
const len0 = WASM_VECTOR_LEN;
|
|
326
|
+
const ret = wasm.rregex_findAll(this.ptr, ptr0, len0);
|
|
316
327
|
return takeObject(ret);
|
|
317
328
|
}
|
|
318
329
|
/**
|
|
@@ -327,10 +338,10 @@ export class RRegex {
|
|
|
327
338
|
replace(text, rep) {
|
|
328
339
|
try {
|
|
329
340
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
341
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
342
|
+
const len0 = WASM_VECTOR_LEN;
|
|
343
|
+
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
344
|
+
const len1 = WASM_VECTOR_LEN;
|
|
334
345
|
wasm.rregex_replace(retptr, this.ptr, ptr0, len0, ptr1, len1);
|
|
335
346
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
336
347
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -352,10 +363,10 @@ export class RRegex {
|
|
|
352
363
|
replacen(text, limit, rep) {
|
|
353
364
|
try {
|
|
354
365
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
366
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
367
|
+
const len0 = WASM_VECTOR_LEN;
|
|
368
|
+
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
|
+
const len1 = WASM_VECTOR_LEN;
|
|
359
370
|
wasm.rregex_replacen(retptr, this.ptr, ptr0, len0, limit, ptr1, len1);
|
|
360
371
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
361
372
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -376,10 +387,10 @@ export class RRegex {
|
|
|
376
387
|
replaceAll(text, rep) {
|
|
377
388
|
try {
|
|
378
389
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
390
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
391
|
+
const len0 = WASM_VECTOR_LEN;
|
|
392
|
+
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
393
|
+
const len1 = WASM_VECTOR_LEN;
|
|
383
394
|
wasm.rregex_replaceAll(retptr, this.ptr, ptr0, len0, ptr1, len1);
|
|
384
395
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
385
396
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -397,9 +408,9 @@ export class RRegex {
|
|
|
397
408
|
* @returns {any}
|
|
398
409
|
*/
|
|
399
410
|
split(text) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
411
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
|
+
const len0 = WASM_VECTOR_LEN;
|
|
413
|
+
const ret = wasm.rregex_split(this.ptr, ptr0, len0);
|
|
403
414
|
return takeObject(ret);
|
|
404
415
|
}
|
|
405
416
|
/**
|
|
@@ -411,9 +422,9 @@ export class RRegex {
|
|
|
411
422
|
* @returns {any}
|
|
412
423
|
*/
|
|
413
424
|
splitn(text, limit) {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
425
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
427
|
+
const ret = wasm.rregex_splitn(this.ptr, ptr0, len0, limit);
|
|
417
428
|
return takeObject(ret);
|
|
418
429
|
}
|
|
419
430
|
/**
|
|
@@ -426,8 +437,8 @@ export class RRegex {
|
|
|
426
437
|
shortestMatch(text) {
|
|
427
438
|
try {
|
|
428
439
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
429
|
-
|
|
430
|
-
|
|
440
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
441
|
+
const len0 = WASM_VECTOR_LEN;
|
|
431
442
|
wasm.rregex_shortestMatch(retptr, this.ptr, ptr0, len0);
|
|
432
443
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
433
444
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -447,8 +458,8 @@ export class RRegex {
|
|
|
447
458
|
shortestMatchAt(text, limit) {
|
|
448
459
|
try {
|
|
449
460
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
450
|
-
|
|
451
|
-
|
|
461
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
452
463
|
wasm.rregex_shortestMatchAt(retptr, this.ptr, ptr0, len0, limit);
|
|
453
464
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
454
465
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
@@ -462,7 +473,7 @@ export class RRegex {
|
|
|
462
473
|
* @returns {any}
|
|
463
474
|
*/
|
|
464
475
|
syntax() {
|
|
465
|
-
|
|
476
|
+
const ret = wasm.rregex_syntax(this.ptr);
|
|
466
477
|
return takeObject(ret);
|
|
467
478
|
}
|
|
468
479
|
/**
|
|
@@ -513,9 +524,17 @@ export class RRegexSet {
|
|
|
513
524
|
*/
|
|
514
525
|
constructor(list) {
|
|
515
526
|
try {
|
|
516
|
-
|
|
517
|
-
|
|
527
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
528
|
+
wasm.rregexset_new(retptr, addBorrowedObject(list));
|
|
529
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
530
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
531
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
532
|
+
if (r2) {
|
|
533
|
+
throw takeObject(r1);
|
|
534
|
+
}
|
|
535
|
+
return RRegexSet.__wrap(r0);
|
|
518
536
|
} finally {
|
|
537
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
519
538
|
heap[stack_pointer++] = undefined;
|
|
520
539
|
}
|
|
521
540
|
}
|
|
@@ -527,9 +546,9 @@ export class RRegexSet {
|
|
|
527
546
|
* @returns {boolean}
|
|
528
547
|
*/
|
|
529
548
|
isMatch(text) {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
549
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
550
|
+
const len0 = WASM_VECTOR_LEN;
|
|
551
|
+
const ret = wasm.rregexset_isMatch(this.ptr, ptr0, len0);
|
|
533
552
|
return ret !== 0;
|
|
534
553
|
}
|
|
535
554
|
/**
|
|
@@ -540,9 +559,9 @@ export class RRegexSet {
|
|
|
540
559
|
* @returns {any}
|
|
541
560
|
*/
|
|
542
561
|
matches(text) {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
562
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
563
|
+
const len0 = WASM_VECTOR_LEN;
|
|
564
|
+
const ret = wasm.rregexset_matches(this.ptr, ptr0, len0);
|
|
546
565
|
return takeObject(ret);
|
|
547
566
|
}
|
|
548
567
|
}
|
|
@@ -552,68 +571,68 @@ export function __wbindgen_object_drop_ref(arg0) {
|
|
|
552
571
|
};
|
|
553
572
|
|
|
554
573
|
export function __wbindgen_string_new(arg0, arg1) {
|
|
555
|
-
|
|
574
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
556
575
|
return addHeapObject(ret);
|
|
557
576
|
};
|
|
558
577
|
|
|
559
578
|
export function __wbindgen_number_new(arg0) {
|
|
560
|
-
|
|
579
|
+
const ret = arg0;
|
|
561
580
|
return addHeapObject(ret);
|
|
562
581
|
};
|
|
563
582
|
|
|
564
583
|
export function __wbindgen_is_string(arg0) {
|
|
565
|
-
|
|
584
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
566
585
|
return ret;
|
|
567
586
|
};
|
|
568
587
|
|
|
569
588
|
export function __wbindgen_string_get(arg0, arg1) {
|
|
570
589
|
const obj = getObject(arg1);
|
|
571
|
-
|
|
590
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
572
591
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
573
592
|
var len0 = WASM_VECTOR_LEN;
|
|
574
593
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
575
594
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
576
595
|
};
|
|
577
596
|
|
|
578
|
-
export function
|
|
579
|
-
|
|
597
|
+
export function __wbg_get_f0f4f1608ebf633e(arg0, arg1) {
|
|
598
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
580
599
|
return addHeapObject(ret);
|
|
581
600
|
};
|
|
582
601
|
|
|
583
|
-
export function
|
|
584
|
-
|
|
602
|
+
export function __wbg_length_93debb0e2e184ab6(arg0) {
|
|
603
|
+
const ret = getObject(arg0).length;
|
|
585
604
|
return ret;
|
|
586
605
|
};
|
|
587
606
|
|
|
588
|
-
export function
|
|
589
|
-
|
|
607
|
+
export function __wbg_new_2ab697f1555e0dbc() {
|
|
608
|
+
const ret = new Array();
|
|
590
609
|
return addHeapObject(ret);
|
|
591
610
|
};
|
|
592
611
|
|
|
593
|
-
export function
|
|
594
|
-
|
|
612
|
+
export function __wbg_new_306ce8d57919e6ae() {
|
|
613
|
+
const ret = new Object();
|
|
595
614
|
return addHeapObject(ret);
|
|
596
615
|
};
|
|
597
616
|
|
|
598
|
-
export function
|
|
599
|
-
|
|
617
|
+
export function __wbg_push_811c8b08bf4ff9d5(arg0, arg1) {
|
|
618
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
600
619
|
return ret;
|
|
601
620
|
};
|
|
602
621
|
|
|
603
|
-
export function
|
|
604
|
-
|
|
622
|
+
export function __wbg_new_651776e932b7e9c7(arg0, arg1) {
|
|
623
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
605
624
|
return addHeapObject(ret);
|
|
606
625
|
};
|
|
607
626
|
|
|
608
|
-
export function
|
|
609
|
-
|
|
627
|
+
export function __wbg_set_b12cd0ab82903c2f() { return handleError(function (arg0, arg1, arg2) {
|
|
628
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
610
629
|
return ret;
|
|
611
630
|
}, arguments) };
|
|
612
631
|
|
|
613
632
|
export function __wbindgen_debug_string(arg0, arg1) {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
633
|
+
const ret = debugString(getObject(arg1));
|
|
634
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
635
|
+
const len0 = WASM_VECTOR_LEN;
|
|
617
636
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
618
637
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
619
638
|
};
|
|
@@ -622,7 +641,6 @@ export function __wbindgen_throw(arg0, arg1) {
|
|
|
622
641
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
623
642
|
};
|
|
624
643
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
};
|
|
644
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
645
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
628
646
|
|
package/lib/rregex.wasm
CHANGED
|
Binary file
|
package/lib/rregex.wasm.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export function escape(a: number, b: number, c: number): void;
|
|
5
5
|
export function __wbg_rregex_free(a: number): void;
|
|
6
|
-
export function rregex_new(a: number, b: number):
|
|
6
|
+
export function rregex_new(a: number, b: number, c: number): void;
|
|
7
7
|
export function rregex_isMatch(a: number, b: number, c: number): number;
|
|
8
8
|
export function rregex_isMatchAt(a: number, b: number, c: number, d: number): number;
|
|
9
9
|
export function rregex_find(a: number, b: number, c: number): number;
|
|
@@ -19,7 +19,7 @@ export function rregex_shortestMatchAt(a: number, b: number, c: number, d: numbe
|
|
|
19
19
|
export function rregex_syntax(a: number): number;
|
|
20
20
|
export function rregex_toString(a: number, b: number): void;
|
|
21
21
|
export function __wbg_rregexset_free(a: number): void;
|
|
22
|
-
export function rregexset_new(a: number):
|
|
22
|
+
export function rregexset_new(a: number, b: number): void;
|
|
23
23
|
export function rregexset_isMatch(a: number, b: number, c: number): number;
|
|
24
24
|
export function rregexset_matches(a: number, b: number, c: number): number;
|
|
25
25
|
export function __wbindgen_malloc(a: number): number;
|
package/lib/types.d.ts
CHANGED
|
@@ -505,7 +505,7 @@ export interface InitOutput {
|
|
|
505
505
|
readonly memory: WebAssembly.Memory;
|
|
506
506
|
readonly escape: (a: number, b: number, c: number) => void;
|
|
507
507
|
readonly __wbg_rregex_free: (a: number) => void;
|
|
508
|
-
readonly rregex_new: (a: number, b: number) =>
|
|
508
|
+
readonly rregex_new: (a: number, b: number, c: number) => void;
|
|
509
509
|
readonly rregex_isMatch: (a: number, b: number, c: number) => number;
|
|
510
510
|
readonly rregex_isMatchAt: (a: number, b: number, c: number, d: number) => number;
|
|
511
511
|
readonly rregex_find: (a: number, b: number, c: number) => number;
|
|
@@ -521,7 +521,7 @@ export interface InitOutput {
|
|
|
521
521
|
readonly rregex_syntax: (a: number) => number;
|
|
522
522
|
readonly rregex_toString: (a: number, b: number) => void;
|
|
523
523
|
readonly __wbg_rregexset_free: (a: number) => void;
|
|
524
|
-
readonly rregexset_new: (a: number) =>
|
|
524
|
+
readonly rregexset_new: (a: number, b: number) => void;
|
|
525
525
|
readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
|
|
526
526
|
readonly rregexset_matches: (a: number, b: number, c: number) => number;
|
|
527
527
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
@@ -531,6 +531,15 @@ export interface InitOutput {
|
|
|
531
531
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Synchronously compiles the given `bytes` and instantiates the WebAssembly module.
|
|
536
|
+
*
|
|
537
|
+
* @param {BufferSource} bytes
|
|
538
|
+
*
|
|
539
|
+
* @returns {InitOutput}
|
|
540
|
+
*/
|
|
541
|
+
export function initSync(bytes: BufferSource): InitOutput;
|
|
542
|
+
|
|
534
543
|
/**
|
|
535
544
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
536
545
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
@@ -549,6 +558,6 @@ export const metadata: {
|
|
|
549
558
|
],
|
|
550
559
|
"homepage": "https://2fd.github.io/rregex",
|
|
551
560
|
"repository": "https://github.com/2fd/rregex",
|
|
552
|
-
"regex": "1.
|
|
553
|
-
"regex-syntax": "0.6.
|
|
561
|
+
"regex": "1.6.0",
|
|
562
|
+
"regex-syntax": "0.6.28"
|
|
554
563
|
}
|