sindresorhus / find-up

Find a file or directory by walking up parent directories
MIT License
582 stars 40 forks source link

Add utility methods to check if the path exists #37

Closed sindresorhus closed 5 years ago

sindresorhus commented 5 years ago

Issuehunt badges

This will be useful for #28.

I'm thinking findUp.exists() and findUp.sync.exists().

We already depend on https://github.com/sindresorhus/path-exists further down in the dependency tree, so we can just depend on that here without any added weight.

Should be tested and added to the readme and TS definition.


IssueHunt Summary #### [tiagodanin tiagodanin](https://issuehunt.io/u/tiagodanin) has been rewarded. ### Sponsors (Total: $60.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($60.00) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/sindresorhus/find-up/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
IssueHuntBot commented 5 years ago

@issuehunt has funded $60.00 to this issue.


coreyfarrell commented 5 years ago

Should this expose locate-path instead of path-exists? I ask since the new version supports checking for specific types of files and path-exists is no longer a dependency (not that it's a large dependency).

issuehunt-oss[bot] commented 5 years ago

@sindresorhus has rewarded $54.00 to @tiagodanin. See it on IssueHunt