Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 22, 2024 via pnpm
Package summary
Share
0
issues
1
license
4
MIT
Package created
1 Sep 2015
Version published
20 Sep 2016
Maintainers
1
Total deps
4
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
find-up@2.0.0
path-exists@2.1.0
pinkie-promise@2.0.1
pinkie@2.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of find-up 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
path-exists2.1.01.88 kBMIT
prod

Visualizations

Frequently Asked Questions

What does find-up do?

Find-up is a useful Node.js package that allows you to find a file or directory by walking up parent directories. It provides a flexible and efficient solution to locate files or directories from a given starting path, with a multitude of custom options to enhance search functionality.

How do you use find-up?

To use find-up, first, install the package using npm with the command $ npm install find-up. Once installed, you can import the necessary functions from the find-up module in your JavaScript file. Here are a few examples of how to use find-up:

For finding a file:

import {findUp} from 'find-up';

console.log(await findUp('unicorn.png'));
// Output: '/Users/sindresorhus/unicorn.png'

For finding either one of the listed files (returns the first one found):

console.log(await findUp(['rainbow.png', 'unicorn.png']));
// Output: '/Users/sindresorhus/unicorn.png'

For custom matcher function:

import path from 'node:path';
import {findUp, pathExists} from 'find-up';

console.log(await findUp(async directory => {
	const hasUnicorns = await pathExists(path.join(directory, 'unicorn.png'));
	return hasUnicorns && directory;
}, {type: 'directory'}));
// Output: '/Users/sindresorhus'

The return values of the functions are promises either for the file path if found, or undefined if not found.

Where are the find-up docs?

The detailed documentation for find-up, including all its parameters and options, is available directly in the readme content provided at the GitHub page https://github.com/sindresorhus/find-up. It explains in-detail about all the methods, options, matchers and usage examples.