find-up
npmv8.0.0TypeScriptFind a file or directory by walking up parent directories
Safe to adopt
Yes — find-up scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 359 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 359 days ago.
- AWeight: grade A, Excellent.
Pulls in 5 transitive packages, about 61 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding find-up to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing find-up, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the find-up README.
import path from 'node:path';
import {pathExists} from 'path-exists';
import {findUp, findDown} from 'find-up';
console.log(await findUp('unicorn.png'));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(['rainbow.png', 'unicorn.png']));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(async directory => {
const hasUnicorn = await pathExists(path.join(directory, 'unicorn.png'));
return hasUnicorn && directory;
}, {type: 'directory'}));find-up vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| find-upthis page | 0 | 4 | MIT | 11 months ago |
| pkg-dirdeprecated | 0 | 1 | MIT | 1 day ago |
| find-up-simple | 0 | 2 | MIT | 1 day ago |
| escalade | 136.6M | 3 | MIT | 1 day ago |
| make-dir | 0 | 2 | MIT | 1 day ago |
| locate-path | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by find-up v8.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (5)
Used by
Popular packages that depend on find-up.
An AST-based pattern checker for JavaScript.
Utility function to load nyc configuration
React Native CLI
No description provided.
Relationship graph
Dependencies (left) and dependents (right) of find-up.
Frequently installed together
Runtime typescript and ESM support for Node.js
The semantic version parser used by npm.
TypeScript definitions for node
Constants and utilities about visitor keys to traverse AST.
Escape RegExp special characters
TypeScript definitions for estree
An AST-based pattern checker for JavaScript.
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run
Prettier is an opinionated code formatter
Helper utilities for creating ESLint configuration
ECMAScript parsing infrastructure for multipurpose analysis
Release history
1 release in the last two years, typically about 124 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 8.0.0latest | 11 months ago | 24 KB | MIT |
| 7.0.0 | 2 years ago | 16 KB | MIT |
| 6.3.0 | 4 years ago | 17 KB | MIT |
| 6.2.0 | 4 years ago | 16 KB | MIT |
| 6.1.0 | 5 years ago | 12 KB | MIT |
| 6.0.0 | 5 years ago | 12 KB | MIT |
| 5.0.0 | 6 years ago | 11 KB | MIT |
| 4.1.0 | 7 years ago | 11 KB | MIT |
| 4.0.0 | 7 years ago | 10.0 KB | MIT |
| 3.0.0 | 8 years ago | 4.7 KB | MIT |
| 2.1.0 | 9 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.1.2 | 10 years ago | — | MIT |
| 1.1.1 | 10 years ago | — | MIT |
| 1.1.0 | 10 years ago | — | MIT |
Overview
find-up is an npm package that find a file or directory by walking up parent directories. It has 4 known dependents in the graph. The latest version is 8.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need find a file or directory by walking up parent directories 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.
Maintainers
Funding
Frequently asked questions
Should I use find-up?
Yes — find-up scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 359 days ago.
How do I install find-up?
Run `npm install find-up` to add find-up to your npm project.
How many dependencies does find-up have?
find-up declares 7 direct dependencies and pulls in 5 packages in total once its runtime tree is resolved totalling about 61 KB on disk.
What license is find-up released under?
find-up is distributed under the MIT license.
How popular is find-up?
npm does not publish download counts. Within PackageGraph's crawl, 4 known packages depend on find-up.
Is find-up still maintained?
The most recent release of find-up (v8.0.0) was published 11 months ago.
Does find-up run install scripts?
No. find-up does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.