Skip to content

pathname can only be string #34

@vastwu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions