{"version":3,"file":"match.mjs","names":[],"sources":["../../src/middlewares/match.ts"],"sourcesContent":["import type { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nexport function match(regexp: RegExp): any {\n  return function (\n    req: $RequestExtend,\n    res: $ResponseExtend,\n    next: $NextFunctionVer,\n    value: string\n  ): void {\n    if (regexp.exec(value)) {\n      next();\n    } else {\n      next('route');\n    }\n  };\n}\n"],"mappings":";AAEA,SAAgB,MAAM,QAAqB;CACzC,OAAO,SACL,KACA,KACA,MACA,OACM;EACN,IAAI,OAAO,KAAK,KAAK,GACnB,KAAK;OAEL,KAAK,OAAO;CAEhB;AACF"}