rregex 1.10.2 → 1.10.4

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 CHANGED
@@ -1315,6 +1315,6 @@ export const metadata: {
1315
1315
  ],
1316
1316
  "homepage": "http://rregex.dev",
1317
1317
  "repository": "https://github.com/2fd/rregex",
1318
- "regex": "1.10.2",
1319
- "regex-syntax": "0.8.2"
1318
+ "regex": "1.10.4",
1319
+ "regex-syntax": "0.8.3"
1320
1320
  }
package/lib/browser.js CHANGED
@@ -1,5 +1,23 @@
1
1
  let wasm;
2
2
 
3
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
4
+
5
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
6
+
7
+ let cachedUint8Memory0 = null;
8
+
9
+ function getUint8Memory0() {
10
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
11
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
+ }
13
+ return cachedUint8Memory0;
14
+ }
15
+
16
+ function getStringFromWasm0(ptr, len) {
17
+ ptr = ptr >>> 0;
18
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
+ }
20
+
3
21
  const heap = new Array(128).fill(undefined);
4
22
 
5
23
  heap.push(undefined, null, true, false);
@@ -29,24 +47,6 @@ function takeObject(idx) {
29
47
  return ret;
30
48
  }
31
49
 
32
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
33
-
34
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
35
-
36
- let cachedUint8Memory0 = null;
37
-
38
- function getUint8Memory0() {
39
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
40
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
- }
42
- return cachedUint8Memory0;
43
- }
44
-
45
- function getStringFromWasm0(ptr, len) {
46
- ptr = ptr >>> 0;
47
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
48
- }
49
-
50
50
  let WASM_VECTOR_LEN = 0;
51
51
 
52
52
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -96,6 +96,7 @@ function passStringToWasm0(arg, malloc, realloc) {
96
96
  const ret = encodeString(arg, view);
97
97
 
98
98
  offset += ret.written;
99
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
99
100
  }
100
101
 
101
102
  WASM_VECTOR_LEN = offset;
@@ -176,6 +177,10 @@ function handleError(f, args) {
176
177
  wasm.__wbindgen_exn_store(addHeapObject(e));
177
178
  }
178
179
  }
180
+
181
+ const RRegexFinalization = (typeof FinalizationRegistry === 'undefined')
182
+ ? { register: () => {}, unregister: () => {} }
183
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregex_free(ptr >>> 0));
179
184
  /**
180
185
  * A compiled regular expression for matching Unicode strings.
181
186
  *
@@ -222,7 +227,7 @@ export class RRegex {
222
227
  __destroy_into_raw() {
223
228
  const ptr = this.__wbg_ptr;
224
229
  this.__wbg_ptr = 0;
225
-
230
+ RRegexFinalization.unregister(this);
226
231
  return ptr;
227
232
  }
228
233
 
@@ -932,6 +937,10 @@ export class RRegex {
932
937
  }
933
938
  }
934
939
  }
940
+
941
+ const RRegexSetFinalization = (typeof FinalizationRegistry === 'undefined')
942
+ ? { register: () => {}, unregister: () => {} }
943
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregexset_free(ptr >>> 0));
935
944
  /**
936
945
  * Match multiple (possibly overlapping) regular expressions in a single scan.
937
946
  * A regex set corresponds to the union of two or more regular expressions.
@@ -949,7 +958,7 @@ export class RRegexSet {
949
958
  __destroy_into_raw() {
950
959
  const ptr = this.__wbg_ptr;
951
960
  this.__wbg_ptr = 0;
952
-
961
+ RRegexSetFinalization.unregister(this);
953
962
  return ptr;
954
963
  }
955
964
 
@@ -1118,6 +1127,10 @@ async function __wbg_load(module, imports) {
1118
1127
  function __wbg_get_imports() {
1119
1128
  const imports = {};
1120
1129
  imports.wbg = {};
1130
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1131
+ const ret = getStringFromWasm0(arg0, arg1);
1132
+ return addHeapObject(ret);
1133
+ };
1121
1134
  imports.wbg.__wbindgen_number_new = function(arg0) {
1122
1135
  const ret = arg0;
1123
1136
  return addHeapObject(ret);
@@ -1125,10 +1138,6 @@ function __wbg_get_imports() {
1125
1138
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1126
1139
  takeObject(arg0);
1127
1140
  };
1128
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1129
- const ret = getStringFromWasm0(arg0, arg1);
1130
- return addHeapObject(ret);
1131
- };
1132
1141
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
1133
1142
  const obj = getObject(arg1);
1134
1143
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1141,61 +1150,61 @@ function __wbg_get_imports() {
1141
1150
  const ret = new Error(getStringFromWasm0(arg0, arg1));
1142
1151
  return addHeapObject(ret);
1143
1152
  };
1144
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1145
- const ret = getObject(arg0);
1146
- return addHeapObject(ret);
1147
- };
1148
1153
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
1149
1154
  const ret = BigInt.asUintN(64, arg0);
1150
1155
  return addHeapObject(ret);
1151
1156
  };
1152
- imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
1157
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1158
+ const ret = getObject(arg0);
1159
+ return addHeapObject(ret);
1160
+ };
1161
+ imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
1153
1162
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1154
1163
  };
1155
- imports.wbg.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) {
1164
+ imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
1156
1165
  const ret = getObject(arg0)[arg1 >>> 0];
1157
1166
  return addHeapObject(ret);
1158
1167
  };
1159
- imports.wbg.__wbg_length_1009b1af0c481d7b = function(arg0) {
1168
+ imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
1160
1169
  const ret = getObject(arg0).length;
1161
1170
  return ret;
1162
1171
  };
1163
- imports.wbg.__wbg_new_ffc6d4d085022169 = function() {
1172
+ imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
1164
1173
  const ret = new Array();
1165
1174
  return addHeapObject(ret);
1166
1175
  };
1167
- imports.wbg.__wbg_new_9fb8d994e1c0aaac = function() {
1176
+ imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
1168
1177
  const ret = new Object();
1169
1178
  return addHeapObject(ret);
1170
1179
  };
1171
- imports.wbg.__wbg_set_f2740edb12e318cd = function(arg0, arg1, arg2) {
1180
+ imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
1172
1181
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1173
1182
  };
1174
- imports.wbg.__wbg_from_71add2e723d1f1b2 = function(arg0) {
1183
+ imports.wbg.__wbg_from_89e3fc3ba5e6fb48 = function(arg0) {
1175
1184
  const ret = Array.from(getObject(arg0));
1176
1185
  return addHeapObject(ret);
1177
1186
  };
1178
- imports.wbg.__wbg_push_901f3914205d44de = function(arg0, arg1) {
1187
+ imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
1179
1188
  const ret = getObject(arg0).push(getObject(arg1));
1180
1189
  return ret;
1181
1190
  };
1182
- imports.wbg.__wbg_fromCodePoint_fd9383eff8873c75 = function() { return handleError(function (arg0) {
1191
+ imports.wbg.__wbg_fromCodePoint_cedd7612a2ff688f = function() { return handleError(function (arg0) {
1183
1192
  const ret = String.fromCodePoint(arg0 >>> 0);
1184
1193
  return addHeapObject(ret);
1185
1194
  }, arguments) };
1186
- imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {
1195
+ imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
1187
1196
  const ret = getObject(arg0).buffer;
1188
1197
  return addHeapObject(ret);
1189
1198
  };
1190
- imports.wbg.__wbg_newwithbyteoffsetandlength_d0482f893617af71 = function(arg0, arg1, arg2) {
1199
+ imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
1191
1200
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1192
1201
  return addHeapObject(ret);
1193
1202
  };
1194
- imports.wbg.__wbg_new_8f67e318f15d7254 = function(arg0) {
1203
+ imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
1195
1204
  const ret = new Uint8Array(getObject(arg0));
1196
1205
  return addHeapObject(ret);
1197
1206
  };
1198
- imports.wbg.__wbg_set_759f75cd92b612d2 = function() { return handleError(function (arg0, arg1, arg2) {
1207
+ imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
1199
1208
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1200
1209
  return ret;
1201
1210
  }, arguments) };
@@ -1271,6 +1280,6 @@ export const metadata = {
1271
1280
  ],
1272
1281
  "homepage": "http://rregex.dev",
1273
1282
  "repository": "https://github.com/2fd/rregex",
1274
- "regex": "1.10.2",
1275
- "regex-syntax": "0.8.2"
1283
+ "regex": "1.10.4",
1284
+ "regex-syntax": "0.8.3"
1276
1285
  }
package/lib/commonjs.d.ts CHANGED
@@ -1258,6 +1258,6 @@ export const metadata: {
1258
1258
  ],
1259
1259
  "homepage": "http://rregex.dev",
1260
1260
  "repository": "https://github.com/2fd/rregex",
1261
- "regex": "1.10.2",
1262
- "regex-syntax": "0.8.2"
1261
+ "regex": "1.10.4",
1262
+ "regex-syntax": "0.8.3"
1263
1263
  }
package/lib/commonjs.js CHANGED
@@ -3,6 +3,24 @@ imports['wbg'] = module.exports;
3
3
  let wasm;
4
4
  const { TextDecoder, TextEncoder } = require(`util`);
5
5
 
6
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
7
+
8
+ cachedTextDecoder.decode();
9
+
10
+ let cachedUint8Memory0 = null;
11
+
12
+ function getUint8Memory0() {
13
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
14
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
15
+ }
16
+ return cachedUint8Memory0;
17
+ }
18
+
19
+ function getStringFromWasm0(ptr, len) {
20
+ ptr = ptr >>> 0;
21
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
22
+ }
23
+
6
24
  const heap = new Array(128).fill(undefined);
7
25
 
8
26
  heap.push(undefined, null, true, false);
@@ -32,24 +50,6 @@ function takeObject(idx) {
32
50
  return ret;
33
51
  }
34
52
 
35
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
36
-
37
- cachedTextDecoder.decode();
38
-
39
- let cachedUint8Memory0 = null;
40
-
41
- function getUint8Memory0() {
42
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
43
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
44
- }
45
- return cachedUint8Memory0;
46
- }
47
-
48
- function getStringFromWasm0(ptr, len) {
49
- ptr = ptr >>> 0;
50
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
51
- }
52
-
53
53
  let WASM_VECTOR_LEN = 0;
54
54
 
55
55
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -99,6 +99,7 @@ function passStringToWasm0(arg, malloc, realloc) {
99
99
  const ret = encodeString(arg, view);
100
100
 
101
101
  offset += ret.written;
102
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
102
103
  }
103
104
 
104
105
  WASM_VECTOR_LEN = offset;
@@ -179,6 +180,10 @@ function handleError(f, args) {
179
180
  wasm.__wbindgen_exn_store(addHeapObject(e));
180
181
  }
181
182
  }
183
+
184
+ const RRegexFinalization = (typeof FinalizationRegistry === 'undefined')
185
+ ? { register: () => {}, unregister: () => {} }
186
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregex_free(ptr >>> 0));
182
187
  /**
183
188
  * A compiled regular expression for matching Unicode strings.
184
189
  *
@@ -225,7 +230,7 @@ class RRegex {
225
230
  __destroy_into_raw() {
226
231
  const ptr = this.__wbg_ptr;
227
232
  this.__wbg_ptr = 0;
228
-
233
+ RRegexFinalization.unregister(this);
229
234
  return ptr;
230
235
  }
231
236
 
@@ -936,6 +941,10 @@ class RRegex {
936
941
  }
937
942
  }
938
943
  module.exports.RRegex = RRegex;
944
+
945
+ const RRegexSetFinalization = (typeof FinalizationRegistry === 'undefined')
946
+ ? { register: () => {}, unregister: () => {} }
947
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregexset_free(ptr >>> 0));
939
948
  /**
940
949
  * Match multiple (possibly overlapping) regular expressions in a single scan.
941
950
  * A regex set corresponds to the union of two or more regular expressions.
@@ -953,7 +962,7 @@ class RRegexSet {
953
962
  __destroy_into_raw() {
954
963
  const ptr = this.__wbg_ptr;
955
964
  this.__wbg_ptr = 0;
956
-
965
+ RRegexSetFinalization.unregister(this);
957
966
  return ptr;
958
967
  }
959
968
 
@@ -1089,6 +1098,11 @@ class RRegexSet {
1089
1098
  }
1090
1099
  module.exports.RRegexSet = RRegexSet;
1091
1100
 
1101
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
1102
+ const ret = getStringFromWasm0(arg0, arg1);
1103
+ return addHeapObject(ret);
1104
+ };
1105
+
1092
1106
  module.exports.__wbindgen_number_new = function(arg0) {
1093
1107
  const ret = arg0;
1094
1108
  return addHeapObject(ret);
@@ -1098,11 +1112,6 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
1098
1112
  takeObject(arg0);
1099
1113
  };
1100
1114
 
1101
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
1102
- const ret = getStringFromWasm0(arg0, arg1);
1103
- return addHeapObject(ret);
1104
- };
1105
-
1106
1115
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
1107
1116
  const obj = getObject(arg1);
1108
1117
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1117,75 +1126,75 @@ module.exports.__wbindgen_error_new = function(arg0, arg1) {
1117
1126
  return addHeapObject(ret);
1118
1127
  };
1119
1128
 
1120
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
1121
- const ret = getObject(arg0);
1129
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
1130
+ const ret = BigInt.asUintN(64, arg0);
1122
1131
  return addHeapObject(ret);
1123
1132
  };
1124
1133
 
1125
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
1126
- const ret = BigInt.asUintN(64, arg0);
1134
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
1135
+ const ret = getObject(arg0);
1127
1136
  return addHeapObject(ret);
1128
1137
  };
1129
1138
 
1130
- module.exports.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
1139
+ module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
1131
1140
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1132
1141
  };
1133
1142
 
1134
- module.exports.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) {
1143
+ module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
1135
1144
  const ret = getObject(arg0)[arg1 >>> 0];
1136
1145
  return addHeapObject(ret);
1137
1146
  };
1138
1147
 
1139
- module.exports.__wbg_length_1009b1af0c481d7b = function(arg0) {
1148
+ module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
1140
1149
  const ret = getObject(arg0).length;
1141
1150
  return ret;
1142
1151
  };
1143
1152
 
1144
- module.exports.__wbg_new_ffc6d4d085022169 = function() {
1153
+ module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
1145
1154
  const ret = new Array();
1146
1155
  return addHeapObject(ret);
1147
1156
  };
1148
1157
 
1149
- module.exports.__wbg_new_9fb8d994e1c0aaac = function() {
1158
+ module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
1150
1159
  const ret = new Object();
1151
1160
  return addHeapObject(ret);
1152
1161
  };
1153
1162
 
1154
- module.exports.__wbg_set_f2740edb12e318cd = function(arg0, arg1, arg2) {
1163
+ module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
1155
1164
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1156
1165
  };
1157
1166
 
1158
- module.exports.__wbg_from_71add2e723d1f1b2 = function(arg0) {
1167
+ module.exports.__wbg_from_89e3fc3ba5e6fb48 = function(arg0) {
1159
1168
  const ret = Array.from(getObject(arg0));
1160
1169
  return addHeapObject(ret);
1161
1170
  };
1162
1171
 
1163
- module.exports.__wbg_push_901f3914205d44de = function(arg0, arg1) {
1172
+ module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
1164
1173
  const ret = getObject(arg0).push(getObject(arg1));
1165
1174
  return ret;
1166
1175
  };
1167
1176
 
1168
- module.exports.__wbg_fromCodePoint_fd9383eff8873c75 = function() { return handleError(function (arg0) {
1177
+ module.exports.__wbg_fromCodePoint_cedd7612a2ff688f = function() { return handleError(function (arg0) {
1169
1178
  const ret = String.fromCodePoint(arg0 >>> 0);
1170
1179
  return addHeapObject(ret);
1171
1180
  }, arguments) };
1172
1181
 
1173
- module.exports.__wbg_buffer_a448f833075b71ba = function(arg0) {
1182
+ module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
1174
1183
  const ret = getObject(arg0).buffer;
1175
1184
  return addHeapObject(ret);
1176
1185
  };
1177
1186
 
1178
- module.exports.__wbg_newwithbyteoffsetandlength_d0482f893617af71 = function(arg0, arg1, arg2) {
1187
+ module.exports.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
1179
1188
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1180
1189
  return addHeapObject(ret);
1181
1190
  };
1182
1191
 
1183
- module.exports.__wbg_new_8f67e318f15d7254 = function(arg0) {
1192
+ module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
1184
1193
  const ret = new Uint8Array(getObject(arg0));
1185
1194
  return addHeapObject(ret);
1186
1195
  };
1187
1196
 
1188
- module.exports.__wbg_set_759f75cd92b612d2 = function() { return handleError(function (arg0, arg1, arg2) {
1197
+ module.exports.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
1189
1198
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1190
1199
  return ret;
1191
1200
  }, arguments) };
@@ -1216,6 +1225,6 @@ module.exports.metadata = {
1216
1225
  ],
1217
1226
  "homepage": "http://rregex.dev",
1218
1227
  "repository": "https://github.com/2fd/rregex",
1219
- "regex": "1.10.2",
1220
- "regex-syntax": "0.8.2"
1228
+ "regex": "1.10.4",
1229
+ "regex-syntax": "0.8.3"
1221
1230
  }
package/lib/module.d.ts CHANGED
@@ -1258,6 +1258,6 @@ export const metadata: {
1258
1258
  ],
1259
1259
  "homepage": "http://rregex.dev",
1260
1260
  "repository": "https://github.com/2fd/rregex",
1261
- "regex": "1.10.2",
1262
- "regex-syntax": "0.8.2"
1261
+ "regex": "1.10.4",
1262
+ "regex-syntax": "0.8.3"
1263
1263
  }
package/lib/module.js CHANGED
@@ -4,6 +4,26 @@ export function __wbg_set_wasm(val) {
4
4
  }
5
5
 
6
6
 
7
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
8
+
9
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+
11
+ cachedTextDecoder.decode();
12
+
13
+ let cachedUint8Memory0 = null;
14
+
15
+ function getUint8Memory0() {
16
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
17
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
18
+ }
19
+ return cachedUint8Memory0;
20
+ }
21
+
22
+ function getStringFromWasm0(ptr, len) {
23
+ ptr = ptr >>> 0;
24
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
25
+ }
26
+
7
27
  const heap = new Array(128).fill(undefined);
8
28
 
9
29
  heap.push(undefined, null, true, false);
@@ -33,26 +53,6 @@ function takeObject(idx) {
33
53
  return ret;
34
54
  }
35
55
 
36
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
37
-
38
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
39
-
40
- cachedTextDecoder.decode();
41
-
42
- let cachedUint8Memory0 = null;
43
-
44
- function getUint8Memory0() {
45
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
46
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
47
- }
48
- return cachedUint8Memory0;
49
- }
50
-
51
- function getStringFromWasm0(ptr, len) {
52
- ptr = ptr >>> 0;
53
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
54
- }
55
-
56
56
  let WASM_VECTOR_LEN = 0;
57
57
 
58
58
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
@@ -104,6 +104,7 @@ function passStringToWasm0(arg, malloc, realloc) {
104
104
  const ret = encodeString(arg, view);
105
105
 
106
106
  offset += ret.written;
107
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
107
108
  }
108
109
 
109
110
  WASM_VECTOR_LEN = offset;
@@ -184,6 +185,10 @@ function handleError(f, args) {
184
185
  wasm.__wbindgen_exn_store(addHeapObject(e));
185
186
  }
186
187
  }
188
+
189
+ const RRegexFinalization = (typeof FinalizationRegistry === 'undefined')
190
+ ? { register: () => {}, unregister: () => {} }
191
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregex_free(ptr >>> 0));
187
192
  /**
188
193
  * A compiled regular expression for matching Unicode strings.
189
194
  *
@@ -230,7 +235,7 @@ export class RRegex {
230
235
  __destroy_into_raw() {
231
236
  const ptr = this.__wbg_ptr;
232
237
  this.__wbg_ptr = 0;
233
-
238
+ RRegexFinalization.unregister(this);
234
239
  return ptr;
235
240
  }
236
241
 
@@ -940,6 +945,10 @@ export class RRegex {
940
945
  }
941
946
  }
942
947
  }
948
+
949
+ const RRegexSetFinalization = (typeof FinalizationRegistry === 'undefined')
950
+ ? { register: () => {}, unregister: () => {} }
951
+ : new FinalizationRegistry(ptr => wasm.__wbg_rregexset_free(ptr >>> 0));
943
952
  /**
944
953
  * Match multiple (possibly overlapping) regular expressions in a single scan.
945
954
  * A regex set corresponds to the union of two or more regular expressions.
@@ -957,7 +966,7 @@ export class RRegexSet {
957
966
  __destroy_into_raw() {
958
967
  const ptr = this.__wbg_ptr;
959
968
  this.__wbg_ptr = 0;
960
-
969
+ RRegexSetFinalization.unregister(this);
961
970
  return ptr;
962
971
  }
963
972
 
@@ -1092,6 +1101,11 @@ export class RRegexSet {
1092
1101
  }
1093
1102
  }
1094
1103
 
1104
+ export function __wbindgen_string_new(arg0, arg1) {
1105
+ const ret = getStringFromWasm0(arg0, arg1);
1106
+ return addHeapObject(ret);
1107
+ };
1108
+
1095
1109
  export function __wbindgen_number_new(arg0) {
1096
1110
  const ret = arg0;
1097
1111
  return addHeapObject(ret);
@@ -1101,11 +1115,6 @@ export function __wbindgen_object_drop_ref(arg0) {
1101
1115
  takeObject(arg0);
1102
1116
  };
1103
1117
 
1104
- export function __wbindgen_string_new(arg0, arg1) {
1105
- const ret = getStringFromWasm0(arg0, arg1);
1106
- return addHeapObject(ret);
1107
- };
1108
-
1109
1118
  export function __wbindgen_string_get(arg0, arg1) {
1110
1119
  const obj = getObject(arg1);
1111
1120
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1120,75 +1129,75 @@ export function __wbindgen_error_new(arg0, arg1) {
1120
1129
  return addHeapObject(ret);
1121
1130
  };
1122
1131
 
1123
- export function __wbindgen_object_clone_ref(arg0) {
1124
- const ret = getObject(arg0);
1132
+ export function __wbindgen_bigint_from_u64(arg0) {
1133
+ const ret = BigInt.asUintN(64, arg0);
1125
1134
  return addHeapObject(ret);
1126
1135
  };
1127
1136
 
1128
- export function __wbindgen_bigint_from_u64(arg0) {
1129
- const ret = BigInt.asUintN(64, arg0);
1137
+ export function __wbindgen_object_clone_ref(arg0) {
1138
+ const ret = getObject(arg0);
1130
1139
  return addHeapObject(ret);
1131
1140
  };
1132
1141
 
1133
- export function __wbg_set_9182712abebf82ef(arg0, arg1, arg2) {
1142
+ export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
1134
1143
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1135
1144
  };
1136
1145
 
1137
- export function __wbg_get_f01601b5a68d10e3(arg0, arg1) {
1146
+ export function __wbg_get_bd8e338fbd5f5cc8(arg0, arg1) {
1138
1147
  const ret = getObject(arg0)[arg1 >>> 0];
1139
1148
  return addHeapObject(ret);
1140
1149
  };
1141
1150
 
1142
- export function __wbg_length_1009b1af0c481d7b(arg0) {
1151
+ export function __wbg_length_cd7af8117672b8b8(arg0) {
1143
1152
  const ret = getObject(arg0).length;
1144
1153
  return ret;
1145
1154
  };
1146
1155
 
1147
- export function __wbg_new_ffc6d4d085022169() {
1156
+ export function __wbg_new_16b304a2cfa7ff4a() {
1148
1157
  const ret = new Array();
1149
1158
  return addHeapObject(ret);
1150
1159
  };
1151
1160
 
1152
- export function __wbg_new_9fb8d994e1c0aaac() {
1161
+ export function __wbg_new_72fb9a18b5ae2624() {
1153
1162
  const ret = new Object();
1154
1163
  return addHeapObject(ret);
1155
1164
  };
1156
1165
 
1157
- export function __wbg_set_f2740edb12e318cd(arg0, arg1, arg2) {
1166
+ export function __wbg_set_d4638f722068f043(arg0, arg1, arg2) {
1158
1167
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1159
1168
  };
1160
1169
 
1161
- export function __wbg_from_71add2e723d1f1b2(arg0) {
1170
+ export function __wbg_from_89e3fc3ba5e6fb48(arg0) {
1162
1171
  const ret = Array.from(getObject(arg0));
1163
1172
  return addHeapObject(ret);
1164
1173
  };
1165
1174
 
1166
- export function __wbg_push_901f3914205d44de(arg0, arg1) {
1175
+ export function __wbg_push_a5b05aedc7234f9f(arg0, arg1) {
1167
1176
  const ret = getObject(arg0).push(getObject(arg1));
1168
1177
  return ret;
1169
1178
  };
1170
1179
 
1171
- export function __wbg_fromCodePoint_fd9383eff8873c75() { return handleError(function (arg0) {
1180
+ export function __wbg_fromCodePoint_cedd7612a2ff688f() { return handleError(function (arg0) {
1172
1181
  const ret = String.fromCodePoint(arg0 >>> 0);
1173
1182
  return addHeapObject(ret);
1174
1183
  }, arguments) };
1175
1184
 
1176
- export function __wbg_buffer_a448f833075b71ba(arg0) {
1185
+ export function __wbg_buffer_12d079cc21e14bdb(arg0) {
1177
1186
  const ret = getObject(arg0).buffer;
1178
1187
  return addHeapObject(ret);
1179
1188
  };
1180
1189
 
1181
- export function __wbg_newwithbyteoffsetandlength_d0482f893617af71(arg0, arg1, arg2) {
1190
+ export function __wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb(arg0, arg1, arg2) {
1182
1191
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1183
1192
  return addHeapObject(ret);
1184
1193
  };
1185
1194
 
1186
- export function __wbg_new_8f67e318f15d7254(arg0) {
1195
+ export function __wbg_new_63b92bc8671ed464(arg0) {
1187
1196
  const ret = new Uint8Array(getObject(arg0));
1188
1197
  return addHeapObject(ret);
1189
1198
  };
1190
1199
 
1191
- export function __wbg_set_759f75cd92b612d2() { return handleError(function (arg0, arg1, arg2) {
1200
+ export function __wbg_set_1f9b04f170055d33() { return handleError(function (arg0, arg1, arg2) {
1192
1201
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1193
1202
  return ret;
1194
1203
  }, arguments) };
package/lib/rregex.wasm CHANGED
Binary file
package/lib/types.d.ts CHANGED
@@ -1315,6 +1315,6 @@ export const metadata: {
1315
1315
  ],
1316
1316
  "homepage": "http://rregex.dev",
1317
1317
  "repository": "https://github.com/2fd/rregex",
1318
- "regex": "1.10.2",
1319
- "regex-syntax": "0.8.2"
1318
+ "regex": "1.10.4",
1319
+ "regex-syntax": "0.8.3"
1320
1320
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rregex",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "description": "Rust Regex binding for Javascript",
5
5
  "private": false,
6
6
  "main": "./lib/commonjs.js",