rregex 1.8.0 → 1.10.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 +100 -3
- package/lib/browser.js +15 -15
- package/lib/commonjs.d.ts +99 -2
- package/lib/commonjs.js +16 -16
- package/lib/module.d.ts +99 -2
- package/lib/module.js +14 -14
- package/lib/rregex.wasm +0 -0
- package/lib/rregex.wasm.d.ts +1 -1
- package/lib/types.d.ts +100 -3
- package/package.json +11 -1
package/lib/browser.d.ts
CHANGED
|
@@ -309,6 +309,14 @@ export type Look =
|
|
|
309
309
|
| LookWordAsciiNegateVariant
|
|
310
310
|
| LookWordUnicodeVariant
|
|
311
311
|
| LookWordUnicodeNegateVariant
|
|
312
|
+
| LookWordStartAsciiVariant
|
|
313
|
+
| LookWordEndAsciiVariant
|
|
314
|
+
| LookWordStartUnicodeVariant
|
|
315
|
+
| LookWordEndUnicodeVariant
|
|
316
|
+
| LookWordStartHalfAsciiVariant
|
|
317
|
+
| LookWordEndHalfAsciiVariant
|
|
318
|
+
| LookWordStartHalfUnicodeVariant
|
|
319
|
+
| LookWordEndHalfUnicodeVariant
|
|
312
320
|
|
|
313
321
|
/**
|
|
314
322
|
* Match the beginning of text. Specifically, this matches at the starting
|
|
@@ -413,6 +421,95 @@ export type LookWordUnicodeNegateVariant = {
|
|
|
413
421
|
'@type': 'enum'
|
|
414
422
|
'@name': 'regex_syntax::hir:Look'
|
|
415
423
|
'@variant': 'WordUnicodeNegate'
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Match the start of an ASCII-only word boundary. That is, this matches a
|
|
428
|
+
* position at either the beginning of the haystack or where the previous
|
|
429
|
+
* character is not a word character and the following character is a word
|
|
430
|
+
* character.
|
|
431
|
+
*/
|
|
432
|
+
export type LookWordStartAsciiVariant = {
|
|
433
|
+
'@type': 'enum'
|
|
434
|
+
'@name': 'regex_syntax::hir:Look'
|
|
435
|
+
'@variant': 'WordStartAscii'
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Match the end of an ASCII-only word boundary. That is, this matches a
|
|
440
|
+
* position at either the end of the haystack orwhere the previous character is
|
|
441
|
+
* a word character and the following character is not a word character.
|
|
442
|
+
*/
|
|
443
|
+
export type LookWordEndAsciiVariant = {
|
|
444
|
+
'@type': 'enum'
|
|
445
|
+
'@name': 'regex_syntax::hir:Look'
|
|
446
|
+
'@variant': 'WordEndAscii'
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Match the start of a Unicode word boundary. That is, this matches a position
|
|
451
|
+
* at either the beginning of the haystack or where the previous character is
|
|
452
|
+
* not a word character and the following character is a word character.
|
|
453
|
+
*/
|
|
454
|
+
export type LookWordStartUnicodeVariant = {
|
|
455
|
+
'@type': 'enum'
|
|
456
|
+
'@name': 'regex_syntax::hir:Look'
|
|
457
|
+
'@variant': 'WordStartUnicode'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Match the end of a Unicode word boundary. That is, this matches a position at
|
|
462
|
+
* either the end of the haystack or where the previous character is a word
|
|
463
|
+
* character and the following character is not a word character.
|
|
464
|
+
*/
|
|
465
|
+
export type LookWordEndUnicodeVariant = {
|
|
466
|
+
'@type': 'enum'
|
|
467
|
+
'@name': 'regex_syntax::hir:Look'
|
|
468
|
+
'@variant': 'WordEndUnicode'
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Match the start half of an ASCII-only word boundary. That is, this matches a
|
|
473
|
+
* position at either the beginning of the haystack or where the previous
|
|
474
|
+
* character is not a word character.
|
|
475
|
+
*/
|
|
476
|
+
export type LookWordStartHalfAsciiVariant = {
|
|
477
|
+
'@type': 'enum'
|
|
478
|
+
'@name': 'regex_syntax::hir::Look',
|
|
479
|
+
'@variant': 'WordStartHalfAscii'
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Match the end half of an ASCII-only word boundary. That is, this matches a
|
|
484
|
+
* position at either the end of the haystack or where the following character
|
|
485
|
+
* is not a word character.
|
|
486
|
+
*/
|
|
487
|
+
export type LookWordEndHalfAsciiVariant = {
|
|
488
|
+
'@type': 'enum'
|
|
489
|
+
'@name': 'regex_syntax::hir::Look',
|
|
490
|
+
'@variant': 'WordEndHalfAscii'
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Match the start half of a Unicode word boundary. That is, this matches a
|
|
495
|
+
* position at either the beginning of the haystack or where the previous
|
|
496
|
+
* character is not a word character.
|
|
497
|
+
*/
|
|
498
|
+
export type LookWordStartHalfUnicodeVariant = {
|
|
499
|
+
'@type': 'enum'
|
|
500
|
+
'@name': 'regex_syntax::hir::Look',
|
|
501
|
+
'@variant': 'WordStartHalfUnicode'
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Match the end half of a Unicode word boundary. That is, this matches a
|
|
506
|
+
* position at either the end of the haystack or where the following character
|
|
507
|
+
* is not a word character.
|
|
508
|
+
*/
|
|
509
|
+
export type LookWordEndHalfUnicodeVariant = {
|
|
510
|
+
'@type': 'enum'
|
|
511
|
+
'@name': 'regex_syntax::hir::Look',
|
|
512
|
+
'@variant': 'WordEndHalfUnicode'
|
|
416
513
|
}
|
|
417
514
|
|
|
418
515
|
/**
|
|
@@ -1031,11 +1128,11 @@ export interface InitOutput {
|
|
|
1031
1128
|
readonly rregex_shortestMatchAt: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1032
1129
|
readonly rregex_syntax: (a: number, b: number) => void;
|
|
1033
1130
|
readonly rregex_toString: (a: number, b: number) => void;
|
|
1034
|
-
readonly escape: (a: number, b: number, c: number) => void;
|
|
1035
1131
|
readonly __wbg_rregexset_free: (a: number) => void;
|
|
1036
1132
|
readonly rregexset_new: (a: number, b: number) => void;
|
|
1037
1133
|
readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
|
|
1038
1134
|
readonly rregexset_matches: (a: number, b: number, c: number, d: number) => void;
|
|
1135
|
+
readonly escape: (a: number, b: number, c: number) => void;
|
|
1039
1136
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1040
1137
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1041
1138
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
@@ -1072,6 +1169,6 @@ export const metadata: {
|
|
|
1072
1169
|
],
|
|
1073
1170
|
"homepage": "http://rregex.dev",
|
|
1074
1171
|
"repository": "https://github.com/2fd/rregex",
|
|
1075
|
-
"regex": "1.
|
|
1076
|
-
"regex-syntax": "0.
|
|
1172
|
+
"regex": "1.10.2",
|
|
1173
|
+
"regex-syntax": "0.8.2"
|
|
1077
1174
|
}
|
package/lib/browser.js
CHANGED
|
@@ -134,6 +134,14 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
134
134
|
}
|
|
135
135
|
return result;
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
let stack_pointer = 128;
|
|
139
|
+
|
|
140
|
+
function addBorrowedObject(obj) {
|
|
141
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
142
|
+
heap[--stack_pointer] = obj;
|
|
143
|
+
return stack_pointer;
|
|
144
|
+
}
|
|
137
145
|
/**
|
|
138
146
|
* Escapes all regular expression meta characters in `text`.
|
|
139
147
|
*
|
|
@@ -161,14 +169,6 @@ export function escape(text) {
|
|
|
161
169
|
}
|
|
162
170
|
}
|
|
163
171
|
|
|
164
|
-
let stack_pointer = 128;
|
|
165
|
-
|
|
166
|
-
function addBorrowedObject(obj) {
|
|
167
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
168
|
-
heap[--stack_pointer] = obj;
|
|
169
|
-
return stack_pointer;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
172
|
function handleError(f, args) {
|
|
173
173
|
try {
|
|
174
174
|
return f.apply(this, args);
|
|
@@ -1060,10 +1060,6 @@ function __wbg_get_imports() {
|
|
|
1060
1060
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1061
1061
|
return addHeapObject(ret);
|
|
1062
1062
|
};
|
|
1063
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1064
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1065
|
-
return addHeapObject(ret);
|
|
1066
|
-
};
|
|
1067
1063
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1068
1064
|
const obj = getObject(arg1);
|
|
1069
1065
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -1072,6 +1068,10 @@ function __wbg_get_imports() {
|
|
|
1072
1068
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1073
1069
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1074
1070
|
};
|
|
1071
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1072
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1073
|
+
return addHeapObject(ret);
|
|
1074
|
+
};
|
|
1075
1075
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
1076
1076
|
const ret = getObject(arg0);
|
|
1077
1077
|
return addHeapObject(ret);
|
|
@@ -1080,7 +1080,7 @@ function __wbg_get_imports() {
|
|
|
1080
1080
|
const ret = BigInt.asUintN(64, arg0);
|
|
1081
1081
|
return addHeapObject(ret);
|
|
1082
1082
|
};
|
|
1083
|
-
imports.wbg.
|
|
1083
|
+
imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
|
|
1084
1084
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1085
1085
|
};
|
|
1086
1086
|
imports.wbg.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) {
|
|
@@ -1202,6 +1202,6 @@ export const metadata = {
|
|
|
1202
1202
|
],
|
|
1203
1203
|
"homepage": "http://rregex.dev",
|
|
1204
1204
|
"repository": "https://github.com/2fd/rregex",
|
|
1205
|
-
"regex": "1.
|
|
1206
|
-
"regex-syntax": "0.
|
|
1205
|
+
"regex": "1.10.2",
|
|
1206
|
+
"regex-syntax": "0.8.2"
|
|
1207
1207
|
}
|
package/lib/commonjs.d.ts
CHANGED
|
@@ -309,6 +309,14 @@ export type Look =
|
|
|
309
309
|
| LookWordAsciiNegateVariant
|
|
310
310
|
| LookWordUnicodeVariant
|
|
311
311
|
| LookWordUnicodeNegateVariant
|
|
312
|
+
| LookWordStartAsciiVariant
|
|
313
|
+
| LookWordEndAsciiVariant
|
|
314
|
+
| LookWordStartUnicodeVariant
|
|
315
|
+
| LookWordEndUnicodeVariant
|
|
316
|
+
| LookWordStartHalfAsciiVariant
|
|
317
|
+
| LookWordEndHalfAsciiVariant
|
|
318
|
+
| LookWordStartHalfUnicodeVariant
|
|
319
|
+
| LookWordEndHalfUnicodeVariant
|
|
312
320
|
|
|
313
321
|
/**
|
|
314
322
|
* Match the beginning of text. Specifically, this matches at the starting
|
|
@@ -413,6 +421,95 @@ export type LookWordUnicodeNegateVariant = {
|
|
|
413
421
|
'@type': 'enum'
|
|
414
422
|
'@name': 'regex_syntax::hir:Look'
|
|
415
423
|
'@variant': 'WordUnicodeNegate'
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Match the start of an ASCII-only word boundary. That is, this matches a
|
|
428
|
+
* position at either the beginning of the haystack or where the previous
|
|
429
|
+
* character is not a word character and the following character is a word
|
|
430
|
+
* character.
|
|
431
|
+
*/
|
|
432
|
+
export type LookWordStartAsciiVariant = {
|
|
433
|
+
'@type': 'enum'
|
|
434
|
+
'@name': 'regex_syntax::hir:Look'
|
|
435
|
+
'@variant': 'WordStartAscii'
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Match the end of an ASCII-only word boundary. That is, this matches a
|
|
440
|
+
* position at either the end of the haystack orwhere the previous character is
|
|
441
|
+
* a word character and the following character is not a word character.
|
|
442
|
+
*/
|
|
443
|
+
export type LookWordEndAsciiVariant = {
|
|
444
|
+
'@type': 'enum'
|
|
445
|
+
'@name': 'regex_syntax::hir:Look'
|
|
446
|
+
'@variant': 'WordEndAscii'
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Match the start of a Unicode word boundary. That is, this matches a position
|
|
451
|
+
* at either the beginning of the haystack or where the previous character is
|
|
452
|
+
* not a word character and the following character is a word character.
|
|
453
|
+
*/
|
|
454
|
+
export type LookWordStartUnicodeVariant = {
|
|
455
|
+
'@type': 'enum'
|
|
456
|
+
'@name': 'regex_syntax::hir:Look'
|
|
457
|
+
'@variant': 'WordStartUnicode'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Match the end of a Unicode word boundary. That is, this matches a position at
|
|
462
|
+
* either the end of the haystack or where the previous character is a word
|
|
463
|
+
* character and the following character is not a word character.
|
|
464
|
+
*/
|
|
465
|
+
export type LookWordEndUnicodeVariant = {
|
|
466
|
+
'@type': 'enum'
|
|
467
|
+
'@name': 'regex_syntax::hir:Look'
|
|
468
|
+
'@variant': 'WordEndUnicode'
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Match the start half of an ASCII-only word boundary. That is, this matches a
|
|
473
|
+
* position at either the beginning of the haystack or where the previous
|
|
474
|
+
* character is not a word character.
|
|
475
|
+
*/
|
|
476
|
+
export type LookWordStartHalfAsciiVariant = {
|
|
477
|
+
'@type': 'enum'
|
|
478
|
+
'@name': 'regex_syntax::hir::Look',
|
|
479
|
+
'@variant': 'WordStartHalfAscii'
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Match the end half of an ASCII-only word boundary. That is, this matches a
|
|
484
|
+
* position at either the end of the haystack or where the following character
|
|
485
|
+
* is not a word character.
|
|
486
|
+
*/
|
|
487
|
+
export type LookWordEndHalfAsciiVariant = {
|
|
488
|
+
'@type': 'enum'
|
|
489
|
+
'@name': 'regex_syntax::hir::Look',
|
|
490
|
+
'@variant': 'WordEndHalfAscii'
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Match the start half of a Unicode word boundary. That is, this matches a
|
|
495
|
+
* position at either the beginning of the haystack or where the previous
|
|
496
|
+
* character is not a word character.
|
|
497
|
+
*/
|
|
498
|
+
export type LookWordStartHalfUnicodeVariant = {
|
|
499
|
+
'@type': 'enum'
|
|
500
|
+
'@name': 'regex_syntax::hir::Look',
|
|
501
|
+
'@variant': 'WordStartHalfUnicode'
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Match the end half of a Unicode word boundary. That is, this matches a
|
|
506
|
+
* position at either the end of the haystack or where the following character
|
|
507
|
+
* is not a word character.
|
|
508
|
+
*/
|
|
509
|
+
export type LookWordEndHalfUnicodeVariant = {
|
|
510
|
+
'@type': 'enum'
|
|
511
|
+
'@name': 'regex_syntax::hir::Look',
|
|
512
|
+
'@variant': 'WordEndHalfUnicode'
|
|
416
513
|
}
|
|
417
514
|
|
|
418
515
|
/**
|
|
@@ -1015,6 +1112,6 @@ export const metadata: {
|
|
|
1015
1112
|
],
|
|
1016
1113
|
"homepage": "http://rregex.dev",
|
|
1017
1114
|
"repository": "https://github.com/2fd/rregex",
|
|
1018
|
-
"regex": "1.
|
|
1019
|
-
"regex-syntax": "0.
|
|
1115
|
+
"regex": "1.10.2",
|
|
1116
|
+
"regex-syntax": "0.8.2"
|
|
1020
1117
|
}
|
package/lib/commonjs.js
CHANGED
|
@@ -137,6 +137,14 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
137
137
|
}
|
|
138
138
|
return result;
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
let stack_pointer = 128;
|
|
142
|
+
|
|
143
|
+
function addBorrowedObject(obj) {
|
|
144
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
145
|
+
heap[--stack_pointer] = obj;
|
|
146
|
+
return stack_pointer;
|
|
147
|
+
}
|
|
140
148
|
/**
|
|
141
149
|
* Escapes all regular expression meta characters in `text`.
|
|
142
150
|
*
|
|
@@ -164,14 +172,6 @@ module.exports.escape = function(text) {
|
|
|
164
172
|
}
|
|
165
173
|
};
|
|
166
174
|
|
|
167
|
-
let stack_pointer = 128;
|
|
168
|
-
|
|
169
|
-
function addBorrowedObject(obj) {
|
|
170
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
171
|
-
heap[--stack_pointer] = obj;
|
|
172
|
-
return stack_pointer;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
175
|
function handleError(f, args) {
|
|
176
176
|
try {
|
|
177
177
|
return f.apply(this, args);
|
|
@@ -1034,11 +1034,6 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
1034
1034
|
return addHeapObject(ret);
|
|
1035
1035
|
};
|
|
1036
1036
|
|
|
1037
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
1038
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1039
|
-
return addHeapObject(ret);
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
1037
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
1043
1038
|
const obj = getObject(arg1);
|
|
1044
1039
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -1048,6 +1043,11 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
1048
1043
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1049
1044
|
};
|
|
1050
1045
|
|
|
1046
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
1047
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1048
|
+
return addHeapObject(ret);
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
1051
|
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
1052
1052
|
const ret = getObject(arg0);
|
|
1053
1053
|
return addHeapObject(ret);
|
|
@@ -1058,7 +1058,7 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
|
1058
1058
|
return addHeapObject(ret);
|
|
1059
1059
|
};
|
|
1060
1060
|
|
|
1061
|
-
module.exports.
|
|
1061
|
+
module.exports.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
|
|
1062
1062
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1063
1063
|
};
|
|
1064
1064
|
|
|
@@ -1147,6 +1147,6 @@ module.exports.metadata = {
|
|
|
1147
1147
|
],
|
|
1148
1148
|
"homepage": "http://rregex.dev",
|
|
1149
1149
|
"repository": "https://github.com/2fd/rregex",
|
|
1150
|
-
"regex": "1.
|
|
1151
|
-
"regex-syntax": "0.
|
|
1150
|
+
"regex": "1.10.2",
|
|
1151
|
+
"regex-syntax": "0.8.2"
|
|
1152
1152
|
}
|
package/lib/module.d.ts
CHANGED
|
@@ -309,6 +309,14 @@ export type Look =
|
|
|
309
309
|
| LookWordAsciiNegateVariant
|
|
310
310
|
| LookWordUnicodeVariant
|
|
311
311
|
| LookWordUnicodeNegateVariant
|
|
312
|
+
| LookWordStartAsciiVariant
|
|
313
|
+
| LookWordEndAsciiVariant
|
|
314
|
+
| LookWordStartUnicodeVariant
|
|
315
|
+
| LookWordEndUnicodeVariant
|
|
316
|
+
| LookWordStartHalfAsciiVariant
|
|
317
|
+
| LookWordEndHalfAsciiVariant
|
|
318
|
+
| LookWordStartHalfUnicodeVariant
|
|
319
|
+
| LookWordEndHalfUnicodeVariant
|
|
312
320
|
|
|
313
321
|
/**
|
|
314
322
|
* Match the beginning of text. Specifically, this matches at the starting
|
|
@@ -413,6 +421,95 @@ export type LookWordUnicodeNegateVariant = {
|
|
|
413
421
|
'@type': 'enum'
|
|
414
422
|
'@name': 'regex_syntax::hir:Look'
|
|
415
423
|
'@variant': 'WordUnicodeNegate'
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Match the start of an ASCII-only word boundary. That is, this matches a
|
|
428
|
+
* position at either the beginning of the haystack or where the previous
|
|
429
|
+
* character is not a word character and the following character is a word
|
|
430
|
+
* character.
|
|
431
|
+
*/
|
|
432
|
+
export type LookWordStartAsciiVariant = {
|
|
433
|
+
'@type': 'enum'
|
|
434
|
+
'@name': 'regex_syntax::hir:Look'
|
|
435
|
+
'@variant': 'WordStartAscii'
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Match the end of an ASCII-only word boundary. That is, this matches a
|
|
440
|
+
* position at either the end of the haystack orwhere the previous character is
|
|
441
|
+
* a word character and the following character is not a word character.
|
|
442
|
+
*/
|
|
443
|
+
export type LookWordEndAsciiVariant = {
|
|
444
|
+
'@type': 'enum'
|
|
445
|
+
'@name': 'regex_syntax::hir:Look'
|
|
446
|
+
'@variant': 'WordEndAscii'
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Match the start of a Unicode word boundary. That is, this matches a position
|
|
451
|
+
* at either the beginning of the haystack or where the previous character is
|
|
452
|
+
* not a word character and the following character is a word character.
|
|
453
|
+
*/
|
|
454
|
+
export type LookWordStartUnicodeVariant = {
|
|
455
|
+
'@type': 'enum'
|
|
456
|
+
'@name': 'regex_syntax::hir:Look'
|
|
457
|
+
'@variant': 'WordStartUnicode'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Match the end of a Unicode word boundary. That is, this matches a position at
|
|
462
|
+
* either the end of the haystack or where the previous character is a word
|
|
463
|
+
* character and the following character is not a word character.
|
|
464
|
+
*/
|
|
465
|
+
export type LookWordEndUnicodeVariant = {
|
|
466
|
+
'@type': 'enum'
|
|
467
|
+
'@name': 'regex_syntax::hir:Look'
|
|
468
|
+
'@variant': 'WordEndUnicode'
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Match the start half of an ASCII-only word boundary. That is, this matches a
|
|
473
|
+
* position at either the beginning of the haystack or where the previous
|
|
474
|
+
* character is not a word character.
|
|
475
|
+
*/
|
|
476
|
+
export type LookWordStartHalfAsciiVariant = {
|
|
477
|
+
'@type': 'enum'
|
|
478
|
+
'@name': 'regex_syntax::hir::Look',
|
|
479
|
+
'@variant': 'WordStartHalfAscii'
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Match the end half of an ASCII-only word boundary. That is, this matches a
|
|
484
|
+
* position at either the end of the haystack or where the following character
|
|
485
|
+
* is not a word character.
|
|
486
|
+
*/
|
|
487
|
+
export type LookWordEndHalfAsciiVariant = {
|
|
488
|
+
'@type': 'enum'
|
|
489
|
+
'@name': 'regex_syntax::hir::Look',
|
|
490
|
+
'@variant': 'WordEndHalfAscii'
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Match the start half of a Unicode word boundary. That is, this matches a
|
|
495
|
+
* position at either the beginning of the haystack or where the previous
|
|
496
|
+
* character is not a word character.
|
|
497
|
+
*/
|
|
498
|
+
export type LookWordStartHalfUnicodeVariant = {
|
|
499
|
+
'@type': 'enum'
|
|
500
|
+
'@name': 'regex_syntax::hir::Look',
|
|
501
|
+
'@variant': 'WordStartHalfUnicode'
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Match the end half of a Unicode word boundary. That is, this matches a
|
|
506
|
+
* position at either the end of the haystack or where the following character
|
|
507
|
+
* is not a word character.
|
|
508
|
+
*/
|
|
509
|
+
export type LookWordEndHalfUnicodeVariant = {
|
|
510
|
+
'@type': 'enum'
|
|
511
|
+
'@name': 'regex_syntax::hir::Look',
|
|
512
|
+
'@variant': 'WordEndHalfUnicode'
|
|
416
513
|
}
|
|
417
514
|
|
|
418
515
|
/**
|
|
@@ -1015,6 +1112,6 @@ export const metadata: {
|
|
|
1015
1112
|
],
|
|
1016
1113
|
"homepage": "http://rregex.dev",
|
|
1017
1114
|
"repository": "https://github.com/2fd/rregex",
|
|
1018
|
-
"regex": "1.
|
|
1019
|
-
"regex-syntax": "0.
|
|
1115
|
+
"regex": "1.10.2",
|
|
1116
|
+
"regex-syntax": "0.8.2"
|
|
1020
1117
|
}
|
package/lib/module.js
CHANGED
|
@@ -142,6 +142,14 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
142
142
|
}
|
|
143
143
|
return result;
|
|
144
144
|
}
|
|
145
|
+
|
|
146
|
+
let stack_pointer = 128;
|
|
147
|
+
|
|
148
|
+
function addBorrowedObject(obj) {
|
|
149
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
150
|
+
heap[--stack_pointer] = obj;
|
|
151
|
+
return stack_pointer;
|
|
152
|
+
}
|
|
145
153
|
/**
|
|
146
154
|
* Escapes all regular expression meta characters in `text`.
|
|
147
155
|
*
|
|
@@ -169,14 +177,6 @@ export function escape(text) {
|
|
|
169
177
|
}
|
|
170
178
|
}
|
|
171
179
|
|
|
172
|
-
let stack_pointer = 128;
|
|
173
|
-
|
|
174
|
-
function addBorrowedObject(obj) {
|
|
175
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
176
|
-
heap[--stack_pointer] = obj;
|
|
177
|
-
return stack_pointer;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
180
|
function handleError(f, args) {
|
|
181
181
|
try {
|
|
182
182
|
return f.apply(this, args);
|
|
@@ -1037,11 +1037,6 @@ export function __wbindgen_string_new(arg0, arg1) {
|
|
|
1037
1037
|
return addHeapObject(ret);
|
|
1038
1038
|
};
|
|
1039
1039
|
|
|
1040
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
1041
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1042
|
-
return addHeapObject(ret);
|
|
1043
|
-
};
|
|
1044
|
-
|
|
1045
1040
|
export function __wbindgen_string_get(arg0, arg1) {
|
|
1046
1041
|
const obj = getObject(arg1);
|
|
1047
1042
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -1051,6 +1046,11 @@ export function __wbindgen_string_get(arg0, arg1) {
|
|
|
1051
1046
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1052
1047
|
};
|
|
1053
1048
|
|
|
1049
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
1050
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1051
|
+
return addHeapObject(ret);
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
1054
|
export function __wbindgen_object_clone_ref(arg0) {
|
|
1055
1055
|
const ret = getObject(arg0);
|
|
1056
1056
|
return addHeapObject(ret);
|
|
@@ -1061,7 +1061,7 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
|
1061
1061
|
return addHeapObject(ret);
|
|
1062
1062
|
};
|
|
1063
1063
|
|
|
1064
|
-
export function
|
|
1064
|
+
export function __wbg_set_9182712abebf82ef(arg0, arg1, arg2) {
|
|
1065
1065
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1066
1066
|
};
|
|
1067
1067
|
|
package/lib/rregex.wasm
CHANGED
|
Binary file
|
package/lib/rregex.wasm.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ export function rregex_shortestMatch(a: number, b: number, c: number, d: number)
|
|
|
21
21
|
export function rregex_shortestMatchAt(a: number, b: number, c: number, d: number, e: number): void;
|
|
22
22
|
export function rregex_syntax(a: number, b: number): void;
|
|
23
23
|
export function rregex_toString(a: number, b: number): void;
|
|
24
|
-
export function escape(a: number, b: number, c: number): void;
|
|
25
24
|
export function __wbg_rregexset_free(a: number): void;
|
|
26
25
|
export function rregexset_new(a: number, b: number): void;
|
|
27
26
|
export function rregexset_isMatch(a: number, b: number, c: number): number;
|
|
28
27
|
export function rregexset_matches(a: number, b: number, c: number, d: number): void;
|
|
28
|
+
export function escape(a: number, b: number, c: number): void;
|
|
29
29
|
export function __wbindgen_malloc(a: number, b: number): number;
|
|
30
30
|
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
|
31
31
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
package/lib/types.d.ts
CHANGED
|
@@ -309,6 +309,14 @@ export type Look =
|
|
|
309
309
|
| LookWordAsciiNegateVariant
|
|
310
310
|
| LookWordUnicodeVariant
|
|
311
311
|
| LookWordUnicodeNegateVariant
|
|
312
|
+
| LookWordStartAsciiVariant
|
|
313
|
+
| LookWordEndAsciiVariant
|
|
314
|
+
| LookWordStartUnicodeVariant
|
|
315
|
+
| LookWordEndUnicodeVariant
|
|
316
|
+
| LookWordStartHalfAsciiVariant
|
|
317
|
+
| LookWordEndHalfAsciiVariant
|
|
318
|
+
| LookWordStartHalfUnicodeVariant
|
|
319
|
+
| LookWordEndHalfUnicodeVariant
|
|
312
320
|
|
|
313
321
|
/**
|
|
314
322
|
* Match the beginning of text. Specifically, this matches at the starting
|
|
@@ -413,6 +421,95 @@ export type LookWordUnicodeNegateVariant = {
|
|
|
413
421
|
'@type': 'enum'
|
|
414
422
|
'@name': 'regex_syntax::hir:Look'
|
|
415
423
|
'@variant': 'WordUnicodeNegate'
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Match the start of an ASCII-only word boundary. That is, this matches a
|
|
428
|
+
* position at either the beginning of the haystack or where the previous
|
|
429
|
+
* character is not a word character and the following character is a word
|
|
430
|
+
* character.
|
|
431
|
+
*/
|
|
432
|
+
export type LookWordStartAsciiVariant = {
|
|
433
|
+
'@type': 'enum'
|
|
434
|
+
'@name': 'regex_syntax::hir:Look'
|
|
435
|
+
'@variant': 'WordStartAscii'
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Match the end of an ASCII-only word boundary. That is, this matches a
|
|
440
|
+
* position at either the end of the haystack orwhere the previous character is
|
|
441
|
+
* a word character and the following character is not a word character.
|
|
442
|
+
*/
|
|
443
|
+
export type LookWordEndAsciiVariant = {
|
|
444
|
+
'@type': 'enum'
|
|
445
|
+
'@name': 'regex_syntax::hir:Look'
|
|
446
|
+
'@variant': 'WordEndAscii'
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Match the start of a Unicode word boundary. That is, this matches a position
|
|
451
|
+
* at either the beginning of the haystack or where the previous character is
|
|
452
|
+
* not a word character and the following character is a word character.
|
|
453
|
+
*/
|
|
454
|
+
export type LookWordStartUnicodeVariant = {
|
|
455
|
+
'@type': 'enum'
|
|
456
|
+
'@name': 'regex_syntax::hir:Look'
|
|
457
|
+
'@variant': 'WordStartUnicode'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Match the end of a Unicode word boundary. That is, this matches a position at
|
|
462
|
+
* either the end of the haystack or where the previous character is a word
|
|
463
|
+
* character and the following character is not a word character.
|
|
464
|
+
*/
|
|
465
|
+
export type LookWordEndUnicodeVariant = {
|
|
466
|
+
'@type': 'enum'
|
|
467
|
+
'@name': 'regex_syntax::hir:Look'
|
|
468
|
+
'@variant': 'WordEndUnicode'
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Match the start half of an ASCII-only word boundary. That is, this matches a
|
|
473
|
+
* position at either the beginning of the haystack or where the previous
|
|
474
|
+
* character is not a word character.
|
|
475
|
+
*/
|
|
476
|
+
export type LookWordStartHalfAsciiVariant = {
|
|
477
|
+
'@type': 'enum'
|
|
478
|
+
'@name': 'regex_syntax::hir::Look',
|
|
479
|
+
'@variant': 'WordStartHalfAscii'
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Match the end half of an ASCII-only word boundary. That is, this matches a
|
|
484
|
+
* position at either the end of the haystack or where the following character
|
|
485
|
+
* is not a word character.
|
|
486
|
+
*/
|
|
487
|
+
export type LookWordEndHalfAsciiVariant = {
|
|
488
|
+
'@type': 'enum'
|
|
489
|
+
'@name': 'regex_syntax::hir::Look',
|
|
490
|
+
'@variant': 'WordEndHalfAscii'
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Match the start half of a Unicode word boundary. That is, this matches a
|
|
495
|
+
* position at either the beginning of the haystack or where the previous
|
|
496
|
+
* character is not a word character.
|
|
497
|
+
*/
|
|
498
|
+
export type LookWordStartHalfUnicodeVariant = {
|
|
499
|
+
'@type': 'enum'
|
|
500
|
+
'@name': 'regex_syntax::hir::Look',
|
|
501
|
+
'@variant': 'WordStartHalfUnicode'
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Match the end half of a Unicode word boundary. That is, this matches a
|
|
506
|
+
* position at either the end of the haystack or where the following character
|
|
507
|
+
* is not a word character.
|
|
508
|
+
*/
|
|
509
|
+
export type LookWordEndHalfUnicodeVariant = {
|
|
510
|
+
'@type': 'enum'
|
|
511
|
+
'@name': 'regex_syntax::hir::Look',
|
|
512
|
+
'@variant': 'WordEndHalfUnicode'
|
|
416
513
|
}
|
|
417
514
|
|
|
418
515
|
/**
|
|
@@ -1031,11 +1128,11 @@ export interface InitOutput {
|
|
|
1031
1128
|
readonly rregex_shortestMatchAt: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1032
1129
|
readonly rregex_syntax: (a: number, b: number) => void;
|
|
1033
1130
|
readonly rregex_toString: (a: number, b: number) => void;
|
|
1034
|
-
readonly escape: (a: number, b: number, c: number) => void;
|
|
1035
1131
|
readonly __wbg_rregexset_free: (a: number) => void;
|
|
1036
1132
|
readonly rregexset_new: (a: number, b: number) => void;
|
|
1037
1133
|
readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
|
|
1038
1134
|
readonly rregexset_matches: (a: number, b: number, c: number, d: number) => void;
|
|
1135
|
+
readonly escape: (a: number, b: number, c: number) => void;
|
|
1039
1136
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1040
1137
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1041
1138
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
@@ -1072,6 +1169,6 @@ export const metadata: {
|
|
|
1072
1169
|
],
|
|
1073
1170
|
"homepage": "http://rregex.dev",
|
|
1074
1171
|
"repository": "https://github.com/2fd/rregex",
|
|
1075
|
-
"regex": "1.
|
|
1076
|
-
"regex-syntax": "0.
|
|
1172
|
+
"regex": "1.10.2",
|
|
1173
|
+
"regex-syntax": "0.8.2"
|
|
1077
1174
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rregex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Rust Regex binding for Javascript",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./lib/commonjs.js",
|
|
@@ -76,6 +76,16 @@
|
|
|
76
76
|
"range": "1.7.x",
|
|
77
77
|
"channel": "1.7.x"
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
"name": "1.8.x",
|
|
81
|
+
"range": "1.8.x",
|
|
82
|
+
"channel": "1.8.x"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "1.9.x",
|
|
86
|
+
"range": "1.9.x",
|
|
87
|
+
"channel": "1.9.x"
|
|
88
|
+
},
|
|
79
89
|
{
|
|
80
90
|
"name": "master"
|
|
81
91
|
}
|