@e22m4u/js-trie-router 0.0.8 → 0.0.10
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-ru.md +1 -0
- package/README.md +1 -0
- package/dist/cjs/index.cjs +420 -461
- package/examples/cookie-parsing-example.js +2 -2
- package/examples/params-parsing-example.js +2 -2
- package/examples/query-parsing-example.js +2 -2
- package/examples/uptime-example.js +2 -2
- package/package.json +1 -1
- package/src/hooks/hook-invoker.spec.js +14 -14
- package/src/index.d.ts +3 -4
- package/src/index.js +3 -4
- package/src/parsers/body-parser.spec.js +11 -11
- package/src/parsers/request-parser.spec.js +4 -4
- package/src/request-context.d.ts +17 -0
- package/src/request-context.js +7 -7
- package/src/route-registry.spec.js +7 -7
- package/src/route.d.ts +1 -1
- package/src/route.js +1 -1
- package/src/route.spec.js +16 -16
- package/src/trie-router.d.ts +2 -2
- package/src/trie-router.js +2 -2
- package/src/trie-router.spec.js +23 -23
package/README-ru.md
CHANGED
|
@@ -75,6 +75,7 @@ server.listen(3000, 'localhost'); // прослушивание за
|
|
|
75
75
|
- `method: string` метод запроса в верхнем регистре, например `GET`, `POST` и т.д.
|
|
76
76
|
- `path: string` путь включающий строку запроса, например `/myPath?foo=bar`
|
|
77
77
|
- `pathname: string` путь запроса, например `/myMath`
|
|
78
|
+
- `body: unknown` тело запроса
|
|
78
79
|
|
|
79
80
|
Пример доступа к контексту из обработчика маршрута.
|
|
80
81
|
|
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ set with contents of a parsed incoming request.
|
|
|
75
75
|
- `method: string` request method in uppercase, e.g. `GET`, `POST`, etc.
|
|
76
76
|
- `path: string` path including query string, e.g. `/myPath?foo=bar`
|
|
77
77
|
- `pathname: string` request path, e.g. `/myMath`
|
|
78
|
+
- `body: unknown` request body
|
|
78
79
|
|
|
79
80
|
Example of accessing the context from a route handler.
|
|
80
81
|
|