We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
basename(fp) === 'package.json'
https://github.com/sindresorhus/read-pkg/blob/master/index.js#L13 If it's not a directory we shouldn't then append 'package.json'. Mainly for tests https://github.com/npm/normalize-package-data/tree/master/test/fixtures. I have a bunch of package.jsons that are called something else.
package.json
The text was updated successfully, but these errors were encountered:
Sure, wanna do a PR?
Sorry, something went wrong.
Yup :)
Use pathType.dir to detect if path is directory rather than checking …
815c58f
…the basename Closes sindresorhus#2
Detect if path is actually a directory
57f5329
Closes sindresorhus#2
No branches or pull requests
https://github.com/sindresorhus/read-pkg/blob/master/index.js#L13
If it's not a directory we shouldn't then append 'package.json'.
Mainly for tests https://github.com/npm/normalize-package-data/tree/master/test/fixtures. I have a bunch of
package.json
s that are called something else.The text was updated successfully, but these errors were encountered: