@mapl/router 0.5.5 → 0.5.6
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 +13 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
A fast radix tree router.
|
|
2
2
|
|
|
3
3
|
# Patterns
|
|
4
|
-
|
|
5
4
|
`@mapl/router` supports two basic patterns:
|
|
6
5
|
|
|
7
6
|
```ts
|
|
@@ -9,5 +8,16 @@ A fast radix tree router.
|
|
|
9
8
|
'/**' // Capture everything after the slash
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
# Usage
|
|
12
|
+
These links mentioned below only works on [Github](https://github.com/mapljs/router).
|
|
13
|
+
|
|
14
|
+
See [jit.ts](./bench/routers/src/mapl/jit.ts) for jit compilation usage.
|
|
15
|
+
|
|
16
|
+
You can view example compiler outputs in [snapshots](./snapshots).
|
|
17
|
+
|
|
18
|
+
For jitless examples see:
|
|
19
|
+
- [regexp.ts](./bench/routers/src/mapl/regexp.ts): A RegExp router based on `@mapl/router` tree structure.
|
|
20
|
+
- [tree.ts](./bench/routers/src/mapl/tree.ts): A jitless tree router based on `@mapl/router` tree structure.
|
|
21
|
+
|
|
22
|
+
# Benchmark
|
|
23
|
+
See [routers](./bench/routers) guide for routers benchmarking.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapl/router",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "The fastest possible JS router",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac",
|
|
14
14
|
"exports": {
|
|
15
15
|
"./constants": "./constants.js",
|
|
16
|
-
"./path/compiler": "./path/compiler.js",
|
|
17
16
|
"./method": "./method/index.js",
|
|
18
17
|
"./method/compiler": "./method/compiler.js",
|
|
19
18
|
"./path": "./path/index.js",
|
|
19
|
+
"./tree/compiler": "./tree/compiler.js",
|
|
20
20
|
"./tree/node": "./tree/node.js",
|
|
21
|
-
"./
|
|
21
|
+
"./path/compiler": "./path/compiler.js"
|
|
22
22
|
}
|
|
23
23
|
}
|