Skip to content

pathname can only be string #34

Description

@vastwu

* @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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions