UNPKG

@lottojs/lotto

Version:

Simple, lightweight and dependency-free NodeJS web application framework.

28 lines 744 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Router = void 0; const routing_1 = require("./routing"); class Router extends routing_1.Routing { constructor() { super(); this['@instanceof'] = Symbol.for('Router'); const httpMethods = [ 'GET', 'POST', 'PUT', 'PATCH', 'OPTIONS', 'HEAD', 'ALL', 'DELETE', ]; httpMethods.forEach((method) => { this[method.toLowerCase()] = (...input) => { this.serve(method, ...input); return this; }; }); } } exports.Router = Router; //# sourceMappingURL=router.js.map