locate-path
npmv8.0.0TypeScriptGet the first path that exists on disk of multiple paths
Overview
locate-path is an npm package that get the first path that exists on disk of multiple paths. The latest version is 8.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get the first path that exists on disk of multiple paths and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of locate-path.
Dependencies
Runtime (1)
Dev (3)
Used by
Popular packages that depend on locate-path.
Alternatives to locate-path
Find the root directory of a Node.js project or npm package
Find a file or directory by walking up parent directories
A tiny (183B to 210B) and fast utility to ascend parent directories
Get paths for storing things like data, config, cache, etc
Resolve the path of a module like `require.resolve()` but from a given path
Better streaming static file server with Range and conditional-GET support
Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`
Get the line and column number of a specific character in a string
The core of the humanfs library.
The TypeScript types for the hfs project.
Some useful utilities I often need
Get the PATH environment variable key cross-platform
Frequently installed together
Version history
| Version | Published | License |
|---|---|---|
| 8.0.0latest | 10 months ago | MIT |
| 7.2.0 | 3 years ago | MIT |
| 7.1.1 | 4 years ago | MIT |
| 7.1.0 | 4 years ago | MIT |
| 7.0.0 | 4 years ago | MIT |
| 6.0.0 | 6 years ago | MIT |
| 5.0.0 | 7 years ago | MIT |
| 4.0.0 | 7 years ago | MIT |
| 3.0.0 | 8 years ago | MIT |
| 2.0.0 | 9 years ago | MIT |
| 1.1.0 | 9 years ago | MIT |
| 1.0.0 | 9 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install locate-path?
Run `npm install locate-path` to add locate-path to your npm project.
What license is locate-path released under?
locate-path is distributed under the MIT license.
How popular is locate-path?
locate-path has approximately 0 downloads per week and 1 known dependent packages.