UNPKG

flight-path

Version:

Express style router for Fastly Compute@Edge

13 lines (12 loc) 264 B
export class Route { constructor(matchFn, callback) { this.matchFn = matchFn; this.callback = callback; } check(event) { return this.matchFn(event); } async run(req, res) { await this.callback(req, res); } }