hono.js 610 B

123456789101112131415161718192021
  1. // src/hono.ts
  2. import { HonoBase } from "./hono-base.js";
  3. import { RegExpRouter } from "./router/reg-exp-router/index.js";
  4. import { SmartRouter } from "./router/smart-router/index.js";
  5. import { TrieRouter } from "./router/trie-router/index.js";
  6. var Hono = class extends HonoBase {
  7. /**
  8. * Creates an instance of the Hono class.
  9. *
  10. * @param options - Optional configuration options for the Hono instance.
  11. */
  12. constructor(options = {}) {
  13. super(options);
  14. this.router = options.router ?? new SmartRouter({
  15. routers: [new RegExpRouter(), new TrieRouter()]
  16. });
  17. }
  18. };
  19. export {
  20. Hono
  21. };