rregex 1.7.0 → 1.7.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.
- package/lib/browser.d.ts +15 -13
- package/lib/browser.js +114 -97
- package/lib/commonjs.d.ts +2 -2
- package/lib/commonjs.js +86 -78
- package/lib/module.d.ts +2 -2
- package/lib/module.js +89 -77
- package/lib/rregex.wasm +0 -0
- package/lib/rregex.wasm.d.ts +7 -7
- package/lib/types.d.ts +15 -13
- package/package.json +1 -1
package/lib/commonjs.js
CHANGED
|
@@ -3,7 +3,7 @@ imports['wbg'] = module.exports;
|
|
|
3
3
|
let wasm;
|
|
4
4
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
5
5
|
|
|
6
|
-
const heap = new Array(
|
|
6
|
+
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
8
8
|
heap.push(undefined, null, true, false);
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ function getObject(idx) { return heap[idx]; }
|
|
|
12
12
|
let heap_next = heap.length;
|
|
13
13
|
|
|
14
14
|
function dropObject(idx) {
|
|
15
|
-
if (idx <
|
|
15
|
+
if (idx < 132) return;
|
|
16
16
|
heap[idx] = heap_next;
|
|
17
17
|
heap_next = idx;
|
|
18
18
|
}
|
|
@@ -27,15 +27,17 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
|
|
|
27
27
|
|
|
28
28
|
cachedTextDecoder.decode();
|
|
29
29
|
|
|
30
|
-
let cachedUint8Memory0;
|
|
30
|
+
let cachedUint8Memory0 = null;
|
|
31
|
+
|
|
31
32
|
function getUint8Memory0() {
|
|
32
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
|
33
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
33
34
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
34
35
|
}
|
|
35
36
|
return cachedUint8Memory0;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
function getStringFromWasm0(ptr, len) {
|
|
40
|
+
ptr = ptr >>> 0;
|
|
39
41
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -69,14 +71,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
69
71
|
|
|
70
72
|
if (realloc === undefined) {
|
|
71
73
|
const buf = cachedTextEncoder.encode(arg);
|
|
72
|
-
const ptr = malloc(buf.length);
|
|
74
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
73
75
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
74
76
|
WASM_VECTOR_LEN = buf.length;
|
|
75
77
|
return ptr;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
let len = arg.length;
|
|
79
|
-
let ptr = malloc(len);
|
|
81
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
80
82
|
|
|
81
83
|
const mem = getUint8Memory0();
|
|
82
84
|
|
|
@@ -92,7 +94,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
92
94
|
if (offset !== 0) {
|
|
93
95
|
arg = arg.slice(offset);
|
|
94
96
|
}
|
|
95
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
97
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
96
98
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
97
99
|
const ret = encodeString(arg, view);
|
|
98
100
|
|
|
@@ -107,9 +109,10 @@ function isLikeNone(x) {
|
|
|
107
109
|
return x === undefined || x === null;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
let cachedInt32Memory0;
|
|
112
|
+
let cachedInt32Memory0 = null;
|
|
113
|
+
|
|
111
114
|
function getInt32Memory0() {
|
|
112
|
-
if (cachedInt32Memory0.byteLength === 0) {
|
|
115
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
113
116
|
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
114
117
|
}
|
|
115
118
|
return cachedInt32Memory0;
|
|
@@ -179,11 +182,21 @@ function debugString(val) {
|
|
|
179
182
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
180
183
|
return className;
|
|
181
184
|
}
|
|
185
|
+
|
|
186
|
+
let stack_pointer = 128;
|
|
187
|
+
|
|
188
|
+
function addBorrowedObject(obj) {
|
|
189
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
190
|
+
heap[--stack_pointer] = obj;
|
|
191
|
+
return stack_pointer;
|
|
192
|
+
}
|
|
182
193
|
/**
|
|
183
194
|
* @param {string} text
|
|
184
195
|
* @returns {string}
|
|
185
196
|
*/
|
|
186
197
|
module.exports.escape = function(text) {
|
|
198
|
+
let deferred2_0;
|
|
199
|
+
let deferred2_1;
|
|
187
200
|
try {
|
|
188
201
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
189
202
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -191,21 +204,15 @@ module.exports.escape = function(text) {
|
|
|
191
204
|
wasm.escape(retptr, ptr0, len0);
|
|
192
205
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
193
206
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
207
|
+
deferred2_0 = r0;
|
|
208
|
+
deferred2_1 = r1;
|
|
194
209
|
return getStringFromWasm0(r0, r1);
|
|
195
210
|
} finally {
|
|
196
211
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
197
|
-
wasm.__wbindgen_free(
|
|
212
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
198
213
|
}
|
|
199
214
|
};
|
|
200
215
|
|
|
201
|
-
let stack_pointer = 32;
|
|
202
|
-
|
|
203
|
-
function addBorrowedObject(obj) {
|
|
204
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
205
|
-
heap[--stack_pointer] = obj;
|
|
206
|
-
return stack_pointer;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
216
|
function handleError(f, args) {
|
|
210
217
|
try {
|
|
211
218
|
return f.apply(this, args);
|
|
@@ -219,16 +226,9 @@ function handleError(f, args) {
|
|
|
219
226
|
*/
|
|
220
227
|
class RRegex {
|
|
221
228
|
|
|
222
|
-
static __wrap(ptr) {
|
|
223
|
-
const obj = Object.create(RRegex.prototype);
|
|
224
|
-
obj.ptr = ptr;
|
|
225
|
-
|
|
226
|
-
return obj;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
229
|
__destroy_into_raw() {
|
|
230
|
-
const ptr = this.
|
|
231
|
-
this.
|
|
230
|
+
const ptr = this.__wbg_ptr;
|
|
231
|
+
this.__wbg_ptr = 0;
|
|
232
232
|
|
|
233
233
|
return ptr;
|
|
234
234
|
}
|
|
@@ -254,7 +254,8 @@ class RRegex {
|
|
|
254
254
|
if (r2) {
|
|
255
255
|
throw takeObject(r1);
|
|
256
256
|
}
|
|
257
|
-
|
|
257
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
258
|
+
return this;
|
|
258
259
|
} finally {
|
|
259
260
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
261
|
}
|
|
@@ -269,7 +270,7 @@ class RRegex {
|
|
|
269
270
|
isMatch(text) {
|
|
270
271
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
271
272
|
const len0 = WASM_VECTOR_LEN;
|
|
272
|
-
const ret = wasm.rregex_isMatch(this.
|
|
273
|
+
const ret = wasm.rregex_isMatch(this.__wbg_ptr, ptr0, len0);
|
|
273
274
|
return ret !== 0;
|
|
274
275
|
}
|
|
275
276
|
/**
|
|
@@ -283,7 +284,7 @@ class RRegex {
|
|
|
283
284
|
isMatchAt(text, start) {
|
|
284
285
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
285
286
|
const len0 = WASM_VECTOR_LEN;
|
|
286
|
-
const ret = wasm.rregex_isMatchAt(this.
|
|
287
|
+
const ret = wasm.rregex_isMatchAt(this.__wbg_ptr, ptr0, len0, start);
|
|
287
288
|
return ret !== 0;
|
|
288
289
|
}
|
|
289
290
|
/**
|
|
@@ -296,7 +297,7 @@ class RRegex {
|
|
|
296
297
|
find(text) {
|
|
297
298
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
298
299
|
const len0 = WASM_VECTOR_LEN;
|
|
299
|
-
const ret = wasm.rregex_find(this.
|
|
300
|
+
const ret = wasm.rregex_find(this.__wbg_ptr, ptr0, len0);
|
|
300
301
|
return takeObject(ret);
|
|
301
302
|
}
|
|
302
303
|
/**
|
|
@@ -310,7 +311,7 @@ class RRegex {
|
|
|
310
311
|
findAt(text, start) {
|
|
311
312
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
312
313
|
const len0 = WASM_VECTOR_LEN;
|
|
313
|
-
const ret = wasm.rregex_findAt(this.
|
|
314
|
+
const ret = wasm.rregex_findAt(this.__wbg_ptr, ptr0, len0, start);
|
|
314
315
|
return takeObject(ret);
|
|
315
316
|
}
|
|
316
317
|
/**
|
|
@@ -322,7 +323,7 @@ class RRegex {
|
|
|
322
323
|
findAll(text) {
|
|
323
324
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
324
325
|
const len0 = WASM_VECTOR_LEN;
|
|
325
|
-
const ret = wasm.rregex_findAll(this.
|
|
326
|
+
const ret = wasm.rregex_findAll(this.__wbg_ptr, ptr0, len0);
|
|
326
327
|
return takeObject(ret);
|
|
327
328
|
}
|
|
328
329
|
/**
|
|
@@ -335,19 +336,23 @@ class RRegex {
|
|
|
335
336
|
* @returns {string}
|
|
336
337
|
*/
|
|
337
338
|
replace(text, rep) {
|
|
339
|
+
let deferred3_0;
|
|
340
|
+
let deferred3_1;
|
|
338
341
|
try {
|
|
339
342
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
340
343
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
341
344
|
const len0 = WASM_VECTOR_LEN;
|
|
342
345
|
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
343
346
|
const len1 = WASM_VECTOR_LEN;
|
|
344
|
-
wasm.rregex_replace(retptr, this.
|
|
347
|
+
wasm.rregex_replace(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
345
348
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
346
349
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
350
|
+
deferred3_0 = r0;
|
|
351
|
+
deferred3_1 = r1;
|
|
347
352
|
return getStringFromWasm0(r0, r1);
|
|
348
353
|
} finally {
|
|
349
354
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
350
|
-
wasm.__wbindgen_free(
|
|
355
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
351
356
|
}
|
|
352
357
|
}
|
|
353
358
|
/**
|
|
@@ -360,19 +365,23 @@ class RRegex {
|
|
|
360
365
|
* @returns {string}
|
|
361
366
|
*/
|
|
362
367
|
replacen(text, limit, rep) {
|
|
368
|
+
let deferred3_0;
|
|
369
|
+
let deferred3_1;
|
|
363
370
|
try {
|
|
364
371
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
365
372
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
366
373
|
const len0 = WASM_VECTOR_LEN;
|
|
367
374
|
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
368
375
|
const len1 = WASM_VECTOR_LEN;
|
|
369
|
-
wasm.rregex_replacen(retptr, this.
|
|
376
|
+
wasm.rregex_replacen(retptr, this.__wbg_ptr, ptr0, len0, limit, ptr1, len1);
|
|
370
377
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
371
378
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
379
|
+
deferred3_0 = r0;
|
|
380
|
+
deferred3_1 = r1;
|
|
372
381
|
return getStringFromWasm0(r0, r1);
|
|
373
382
|
} finally {
|
|
374
383
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
375
|
-
wasm.__wbindgen_free(
|
|
384
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
376
385
|
}
|
|
377
386
|
}
|
|
378
387
|
/**
|
|
@@ -384,19 +393,23 @@ class RRegex {
|
|
|
384
393
|
* @returns {string}
|
|
385
394
|
*/
|
|
386
395
|
replaceAll(text, rep) {
|
|
396
|
+
let deferred3_0;
|
|
397
|
+
let deferred3_1;
|
|
387
398
|
try {
|
|
388
399
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
389
400
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
390
401
|
const len0 = WASM_VECTOR_LEN;
|
|
391
402
|
const ptr1 = passStringToWasm0(rep, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
392
403
|
const len1 = WASM_VECTOR_LEN;
|
|
393
|
-
wasm.rregex_replaceAll(retptr, this.
|
|
404
|
+
wasm.rregex_replaceAll(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
394
405
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
395
406
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
407
|
+
deferred3_0 = r0;
|
|
408
|
+
deferred3_1 = r1;
|
|
396
409
|
return getStringFromWasm0(r0, r1);
|
|
397
410
|
} finally {
|
|
398
411
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
399
|
-
wasm.__wbindgen_free(
|
|
412
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
400
413
|
}
|
|
401
414
|
}
|
|
402
415
|
/**
|
|
@@ -409,7 +422,7 @@ class RRegex {
|
|
|
409
422
|
split(text) {
|
|
410
423
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
411
424
|
const len0 = WASM_VECTOR_LEN;
|
|
412
|
-
const ret = wasm.rregex_split(this.
|
|
425
|
+
const ret = wasm.rregex_split(this.__wbg_ptr, ptr0, len0);
|
|
413
426
|
return takeObject(ret);
|
|
414
427
|
}
|
|
415
428
|
/**
|
|
@@ -423,7 +436,7 @@ class RRegex {
|
|
|
423
436
|
splitn(text, limit) {
|
|
424
437
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
438
|
const len0 = WASM_VECTOR_LEN;
|
|
426
|
-
const ret = wasm.rregex_splitn(this.
|
|
439
|
+
const ret = wasm.rregex_splitn(this.__wbg_ptr, ptr0, len0, limit);
|
|
427
440
|
return takeObject(ret);
|
|
428
441
|
}
|
|
429
442
|
/**
|
|
@@ -438,7 +451,7 @@ class RRegex {
|
|
|
438
451
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
439
452
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
440
453
|
const len0 = WASM_VECTOR_LEN;
|
|
441
|
-
wasm.rregex_shortestMatch(retptr, this.
|
|
454
|
+
wasm.rregex_shortestMatch(retptr, this.__wbg_ptr, ptr0, len0);
|
|
442
455
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
443
456
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
444
457
|
return r0 === 0 ? undefined : r1 >>> 0;
|
|
@@ -459,7 +472,7 @@ class RRegex {
|
|
|
459
472
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
460
473
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
461
474
|
const len0 = WASM_VECTOR_LEN;
|
|
462
|
-
wasm.rregex_shortestMatchAt(retptr, this.
|
|
475
|
+
wasm.rregex_shortestMatchAt(retptr, this.__wbg_ptr, ptr0, len0, limit);
|
|
463
476
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
464
477
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
465
478
|
return r0 === 0 ? undefined : r1 >>> 0;
|
|
@@ -472,7 +485,7 @@ class RRegex {
|
|
|
472
485
|
* @returns {any}
|
|
473
486
|
*/
|
|
474
487
|
syntax() {
|
|
475
|
-
const ret = wasm.rregex_syntax(this.
|
|
488
|
+
const ret = wasm.rregex_syntax(this.__wbg_ptr);
|
|
476
489
|
return takeObject(ret);
|
|
477
490
|
}
|
|
478
491
|
/**
|
|
@@ -480,15 +493,19 @@ class RRegex {
|
|
|
480
493
|
* @returns {string}
|
|
481
494
|
*/
|
|
482
495
|
toString() {
|
|
496
|
+
let deferred1_0;
|
|
497
|
+
let deferred1_1;
|
|
483
498
|
try {
|
|
484
499
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
485
|
-
wasm.rregex_toString(retptr, this.
|
|
500
|
+
wasm.rregex_toString(retptr, this.__wbg_ptr);
|
|
486
501
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
487
502
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
503
|
+
deferred1_0 = r0;
|
|
504
|
+
deferred1_1 = r1;
|
|
488
505
|
return getStringFromWasm0(r0, r1);
|
|
489
506
|
} finally {
|
|
490
507
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
491
|
-
wasm.__wbindgen_free(
|
|
508
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
492
509
|
}
|
|
493
510
|
}
|
|
494
511
|
}
|
|
@@ -500,16 +517,9 @@ module.exports.RRegex = RRegex;
|
|
|
500
517
|
*/
|
|
501
518
|
class RRegexSet {
|
|
502
519
|
|
|
503
|
-
static __wrap(ptr) {
|
|
504
|
-
const obj = Object.create(RRegexSet.prototype);
|
|
505
|
-
obj.ptr = ptr;
|
|
506
|
-
|
|
507
|
-
return obj;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
520
|
__destroy_into_raw() {
|
|
511
|
-
const ptr = this.
|
|
512
|
-
this.
|
|
521
|
+
const ptr = this.__wbg_ptr;
|
|
522
|
+
this.__wbg_ptr = 0;
|
|
513
523
|
|
|
514
524
|
return ptr;
|
|
515
525
|
}
|
|
@@ -532,7 +542,8 @@ class RRegexSet {
|
|
|
532
542
|
if (r2) {
|
|
533
543
|
throw takeObject(r1);
|
|
534
544
|
}
|
|
535
|
-
|
|
545
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
546
|
+
return this;
|
|
536
547
|
} finally {
|
|
537
548
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
538
549
|
heap[stack_pointer++] = undefined;
|
|
@@ -548,7 +559,7 @@ class RRegexSet {
|
|
|
548
559
|
isMatch(text) {
|
|
549
560
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
550
561
|
const len0 = WASM_VECTOR_LEN;
|
|
551
|
-
const ret = wasm.rregexset_isMatch(this.
|
|
562
|
+
const ret = wasm.rregexset_isMatch(this.__wbg_ptr, ptr0, len0);
|
|
552
563
|
return ret !== 0;
|
|
553
564
|
}
|
|
554
565
|
/**
|
|
@@ -561,7 +572,7 @@ class RRegexSet {
|
|
|
561
572
|
matches(text) {
|
|
562
573
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
563
574
|
const len0 = WASM_VECTOR_LEN;
|
|
564
|
-
const ret = wasm.rregexset_matches(this.
|
|
575
|
+
const ret = wasm.rregexset_matches(this.__wbg_ptr, ptr0, len0);
|
|
565
576
|
return takeObject(ret);
|
|
566
577
|
}
|
|
567
578
|
}
|
|
@@ -589,53 +600,53 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
589
600
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
590
601
|
const obj = getObject(arg1);
|
|
591
602
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
595
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
603
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
604
|
+
var len1 = WASM_VECTOR_LEN;
|
|
605
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
606
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
596
607
|
};
|
|
597
608
|
|
|
598
|
-
module.exports.
|
|
609
|
+
module.exports.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) {
|
|
599
610
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
600
611
|
return addHeapObject(ret);
|
|
601
612
|
};
|
|
602
613
|
|
|
603
|
-
module.exports.
|
|
614
|
+
module.exports.__wbg_length_1009b1af0c481d7b = function(arg0) {
|
|
604
615
|
const ret = getObject(arg0).length;
|
|
605
616
|
return ret;
|
|
606
617
|
};
|
|
607
618
|
|
|
608
|
-
module.exports.
|
|
619
|
+
module.exports.__wbg_new_ffc6d4d085022169 = function() {
|
|
609
620
|
const ret = new Array();
|
|
610
621
|
return addHeapObject(ret);
|
|
611
622
|
};
|
|
612
623
|
|
|
613
|
-
module.exports.
|
|
624
|
+
module.exports.__wbg_new_9fb8d994e1c0aaac = function() {
|
|
614
625
|
const ret = new Object();
|
|
615
626
|
return addHeapObject(ret);
|
|
616
627
|
};
|
|
617
628
|
|
|
618
|
-
module.exports.
|
|
629
|
+
module.exports.__wbg_push_901f3914205d44de = function(arg0, arg1) {
|
|
619
630
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
620
631
|
return ret;
|
|
621
632
|
};
|
|
622
633
|
|
|
623
|
-
module.exports.
|
|
634
|
+
module.exports.__wbg_new_a64e3f2afc2cf2f8 = function(arg0, arg1) {
|
|
624
635
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
625
636
|
return addHeapObject(ret);
|
|
626
637
|
};
|
|
627
638
|
|
|
628
|
-
module.exports.
|
|
639
|
+
module.exports.__wbg_set_759f75cd92b612d2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
629
640
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
630
641
|
return ret;
|
|
631
642
|
}, arguments) };
|
|
632
643
|
|
|
633
644
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
634
645
|
const ret = debugString(getObject(arg1));
|
|
635
|
-
const
|
|
636
|
-
const
|
|
637
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
638
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
646
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
647
|
+
const len1 = WASM_VECTOR_LEN;
|
|
648
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
649
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
639
650
|
};
|
|
640
651
|
|
|
641
652
|
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
@@ -650,9 +661,6 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
|
650
661
|
wasm = wasmInstance.exports;
|
|
651
662
|
module.exports.__wasm = wasm;
|
|
652
663
|
|
|
653
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
654
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
655
|
-
|
|
656
664
|
|
|
657
665
|
module.exports.metadata = {
|
|
658
666
|
"name": "rregex",
|
|
@@ -662,6 +670,6 @@ module.exports.metadata = {
|
|
|
662
670
|
],
|
|
663
671
|
"homepage": "https://2fd.github.io/rregex",
|
|
664
672
|
"repository": "https://github.com/2fd/rregex",
|
|
665
|
-
"regex": "1.7.
|
|
666
|
-
"regex-syntax": "0.6.
|
|
673
|
+
"regex": "1.7.3",
|
|
674
|
+
"regex-syntax": "0.6.29"
|
|
667
675
|
}
|
package/lib/module.d.ts
CHANGED