|
* @param {String|RegExp} pathname path to match, can be regex |
|
if (kindOf(pathname) !== 'string') { |
|
throw new TypeError('koa-better-serve: expect `pathname` to be string') |
|
} |
|
const filepath = ctx.path.replace(pathname, '') |
i think the code only support pathname which to be a String
koa-better-serve/src/index.js
Line 26 in 9334ee3
koa-better-serve/src/index.js
Lines 46 to 48 in 9334ee3
koa-better-serve/src/index.js
Line 51 in 9334ee3
i think the code only support
pathnamewhich to be a String