p-locate
npmv7.0.0TypeScriptGet the first fulfilled promise that satisfies the provided testing function
Overview
p-locate is an npm package that get the first fulfilled promise that satisfies the provided testing function. It is extremely widely used, with about 267.3M downloads per week and 1 known dependents in the graph. The latest version is 7.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get the first fulfilled promise that satisfies the provided testing function and value a battle-tested, widely-adopted 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
- Large, well-established user base (267.3M weekly downloads).
- 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 p-locate.
Dependencies
Runtime (1)
Dev (6)
Used by
Popular packages that depend on p-locate.
Alternatives to p-locate
Get the first path that exists on disk of multiple paths
Run multiple promise-returning & async functions with limited concurrency
Get an iterator for any JS language value. Works robustly across all environments, all versions.
Mutex locks for async functions
A tiny (183B to 210B) and fast utility to ascend parent directories
A Promise-based interface into processes created by child_process.spawn
A utility to retry failed async methods.
Find the root directory of a Node.js project or npm package
Fastest Levenshtein distance implementation in JS.
Find a file or directory by walking up parent directories — Zero dependencies
Find a file or directory by walking up parent directories
Gracefully handle a Promise using async/await.
Version history
| Version | Published | License |
|---|---|---|
| 7.0.0latest | 5 months ago | MIT |
| 6.0.0 | 4 years ago | MIT |
| 5.0.0 | 6 years ago | MIT |
| 4.1.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.0.0 | 9 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install p-locate?
Run `npm install p-locate` to add p-locate to your npm project.
What license is p-locate released under?
p-locate is distributed under the MIT license.
How popular is p-locate?
p-locate has approximately 267,282,020 downloads per week and 1 known dependent packages.