Buckets:
ktongue/docker_container / .cache /opencode /node_modules /hono /dist /router /trie-router /router.js
| // src/router/trie-router/router.ts | |
| import { checkOptionalParameter } from "../../utils/url.js"; | |
| import { Node } from "./node.js"; | |
| var TrieRouter = class { | |
| name = "TrieRouter"; | |
| #node; | |
| constructor() { | |
| this.#node = new Node(); | |
| } | |
| add(method, path, handler) { | |
| const results = checkOptionalParameter(path); | |
| if (results) { | |
| for (let i = 0, len = results.length; i < len; i++) { | |
| this.#node.insert(method, results[i], handler); | |
| } | |
| return; | |
| } | |
| this.#node.insert(method, path, handler); | |
| } | |
| match(method, path) { | |
| return this.#node.search(method, path); | |
| } | |
| }; | |
| export { | |
| TrieRouter | |
| }; | |
Xet Storage Details
- Size:
- 633 Bytes
- Xet hash:
- 4840c47c886d41929f9ec87b89627d6a3981ba9b5962add811723e34b6b55ba3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.