@e22m4u/js-trie-router 0.4.2 → 0.4.3
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
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
## @e22m4u/js-trie-router
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
3
6
|
HTTP маршрутизатор для Node.js на основе
|
|
4
7
|
[префиксного дерева](https://ru.wikipedia.org/wiki/Trie) (trie).
|
|
5
8
|
|
package/package.json
CHANGED
|
@@ -13,7 +13,6 @@ type RouteMockOptions = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create route mock.
|
|
15
15
|
*
|
|
16
|
-
* @param
|
|
17
|
-
* @returns {Route}
|
|
16
|
+
* @param options
|
|
18
17
|
*/
|
|
19
|
-
export function createRouteMock(options
|
|
18
|
+
export function createRouteMock(options?: RouteMockOptions): Route;
|
|
@@ -2,15 +2,15 @@ import {Route, HttpMethod} from '../route.js';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef {object} RouteMockOptions
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {string} path
|
|
7
|
-
* @property {
|
|
5
|
+
* @property {string|undefined} method
|
|
6
|
+
* @property {string|undefined} path
|
|
7
|
+
* @property {Function|undefined} handler
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Create route mock.
|
|
12
12
|
*
|
|
13
|
-
* @param {
|
|
13
|
+
* @param {RouteMockOptions|undefined} options
|
|
14
14
|
* @returns {Route}
|
|
15
15
|
*/
|
|
16
16
|
export function createRouteMock(options = {}) {
|