rregex 1.10.6 → 1.10.8
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/README.md +10 -11
- package/jsr.json +1 -0
- package/lib/{bundler.d.ts → cf.d.ts} +69 -0
- package/lib/{bundler.mjs → cf.mjs} +7 -4
- package/lib/web.d.ts +1320 -0
- package/package.json +5 -2
- package/lib/bundler_bg.mjs +0 -1213
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A dependency-free WebAssembly build of [Rust Regex](https://docs.rs/regex/latest/regex/) for Javascript
|
|
4
4
|
|
|
5
5
|
  
|
|
6
|
-
](https://jsr.io/@rregex/rregex)
|
|
7
7
|
|
|
8
8
|
> Note: this project is not intended to be used in production jet
|
|
9
9
|
|
|
@@ -47,16 +47,15 @@ Rust has a powerful Regex library with a lot of features that don't exists en th
|
|
|
47
47
|
|
|
48
48
|
This package includes builds for multiple runtimes
|
|
49
49
|
|
|
50
|
-
| Runtime |
|
|
51
|
-
| ------------------ |
|
|
52
|
-
| Node.js (esm) |
|
|
53
|
-
| Node.js (commonjs) |
|
|
54
|
-
| Deno |
|
|
55
|
-
| Bun |
|
|
56
|
-
| Cloudflare Workers |
|
|
57
|
-
| Browser | TODO
|
|
58
|
-
| Standalone | TODO
|
|
59
|
-
| Typescript | `lib/types.d.ts` |
|
|
50
|
+
| Runtime | Import | version |
|
|
51
|
+
| ------------------ | ------------------------------------------------------- | ---------- |
|
|
52
|
+
| Node.js (esm) | `import { RRegex, RRegexSet } from 'rregex'` | `*` |
|
|
53
|
+
| Node.js (commonjs) | `const { RRegex, RRegexSet } = require('rregex')` | `*` |
|
|
54
|
+
| Deno | `import { RRegex, RRegexSet } from '@rregex/rregex'` | `>=1.10.8` |
|
|
55
|
+
| Bun | `import { RRegex, RRegexSet } from '@rregex/rregex'` | `>=1.10.8` |
|
|
56
|
+
| Cloudflare Workers | `import { RRegex, RRegexSet } from 'rregex/lib/cf.mjs'` | `>=1.10.8` |
|
|
57
|
+
| Browser | TODO | |
|
|
58
|
+
| Standalone | TODO | |
|
|
60
59
|
|
|
61
60
|
## Known Issues
|
|
62
61
|
|
package/jsr.json
CHANGED
|
@@ -1249,3 +1249,72 @@ export class RRegexSet {
|
|
|
1249
1249
|
*/
|
|
1250
1250
|
matches(text: string): number[];
|
|
1251
1251
|
}
|
|
1252
|
+
|
|
1253
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1254
|
+
|
|
1255
|
+
export interface InitOutput {
|
|
1256
|
+
readonly memory: WebAssembly.Memory;
|
|
1257
|
+
readonly __wbg_rregex_free: (a: number) => void;
|
|
1258
|
+
readonly rregex_new: (a: number, b: number, c: number) => void;
|
|
1259
|
+
readonly rregex_isMatch: (a: number, b: number, c: number) => number;
|
|
1260
|
+
readonly rregex_isMatchAt: (a: number, b: number, c: number, d: number) => number;
|
|
1261
|
+
readonly rregex_find: (a: number, b: number, c: number, d: number) => void;
|
|
1262
|
+
readonly rregex_findAt: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1263
|
+
readonly rregex_findAll: (a: number, b: number, c: number, d: number) => void;
|
|
1264
|
+
readonly rregex_captureNames: (a: number, b: number) => void;
|
|
1265
|
+
readonly rregex_captures: (a: number, b: number, c: number, d: number) => void;
|
|
1266
|
+
readonly rregex_capturesAll: (a: number, b: number, c: number, d: number) => void;
|
|
1267
|
+
readonly rregex_capturesLength: (a: number) => number;
|
|
1268
|
+
readonly rregex_replace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1269
|
+
readonly rregex_replacen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
1270
|
+
readonly rregex_replaceAll: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1271
|
+
readonly rregex_split: (a: number, b: number, c: number, d: number) => void;
|
|
1272
|
+
readonly rregex_splitn: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1273
|
+
readonly rregex_shortestMatch: (a: number, b: number, c: number, d: number) => void;
|
|
1274
|
+
readonly rregex_shortestMatchAt: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1275
|
+
readonly rregex_syntax: (a: number, b: number) => void;
|
|
1276
|
+
readonly rregex_toString: (a: number, b: number) => void;
|
|
1277
|
+
readonly __wbg_rregexset_free: (a: number) => void;
|
|
1278
|
+
readonly rregexset_new: (a: number, b: number) => void;
|
|
1279
|
+
readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
|
|
1280
|
+
readonly rregexset_matches: (a: number, b: number, c: number, d: number) => void;
|
|
1281
|
+
readonly escape: (a: number, b: number, c: number) => void;
|
|
1282
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1283
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1284
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
1285
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1286
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1290
|
+
/**
|
|
1291
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1292
|
+
* a precompiled `WebAssembly.Module`.
|
|
1293
|
+
*
|
|
1294
|
+
* @param {SyncInitInput} module
|
|
1295
|
+
*
|
|
1296
|
+
* @returns {InitOutput}
|
|
1297
|
+
*/
|
|
1298
|
+
export function initSync(module: SyncInitInput): InitOutput;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1302
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1303
|
+
*
|
|
1304
|
+
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
1305
|
+
*
|
|
1306
|
+
* @returns {Promise<InitOutput>}
|
|
1307
|
+
*/
|
|
1308
|
+
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
1309
|
+
|
|
1310
|
+
export const metadata: {
|
|
1311
|
+
"name": "rregex",
|
|
1312
|
+
"description": "Rust Regex binding for Javascript",
|
|
1313
|
+
"authors": [
|
|
1314
|
+
"Fede Ramirez <i@2fd.me>"
|
|
1315
|
+
],
|
|
1316
|
+
"homepage": "http://rregex.dev",
|
|
1317
|
+
"repository": "https://github.com/2fd/rregex",
|
|
1318
|
+
"regex": "1.10.4",
|
|
1319
|
+
"regex-syntax": "0.8.3"
|
|
1320
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export * from "./
|
|
1
|
+
|
|
2
|
+
import wasm from "./rregex.wasm";
|
|
3
|
+
import { initSync } from "./web.js";
|
|
4
|
+
export * from "./web.js";
|
|
5
|
+
|
|
6
|
+
initSync(wasm);
|
|
7
|
+
|
|
5
8
|
|
|
6
9
|
export const metadata = {
|
|
7
10
|
"name": "rregex",
|