Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when searching for prototype Object method #66

Open
adiktofsugar opened this issue Apr 7, 2020 · 0 comments
Open

TypeError when searching for prototype Object method #66

adiktofsugar opened this issue Apr 7, 2020 · 0 comments

Comments

@adiktofsugar
Copy link

If you search for one of the protoype Object methods or properties, it'll throw an error because of an optimization in parse:

input = REPLACEMENTS[input] || input;

Sample code:

> const pm = require('picomatch')
> pm('toString')
Thrown:
TypeError: output.startsWith is not a function
    at Object.exports.removePrefix (/path/to/node_modules/picomatch/lib/utils.js:48:14)
    at parse (/path/to/node_modules/picomatch/lib/parse.js:130:17)
    at Function.picomatch.makeRe (/path/to/node_modules/picomatch/lib/picomatch.js:291:14)
    at picomatch (/path/to/node_modules/picomatch/lib/picomatch.js:55:17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant