Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 3, 2024 via pnpm
Package summary
Share
0
issues
1
license
7
MIT
Package created
21 Sep 2015
Version published
15 Apr 2019
Maintainers
1
Total deps
7
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
7 Packages, Including:
find-up@3.0.0
locate-path@3.0.0
p-limit@2.3.0
p-locate@3.0.0
p-try@2.2.0
path-exists@3.0.0
pkg-up@3.1.0
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 pkg-up 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
find-up3.0.02.22 kBMIT
prod

Visualizations

Frequently Asked Questions

What does pkg-up do?

"Pkg-up" is a useful npm package that assists developers in finding the nearest package.json file within a directory or file structure. By using an efficient up-tree search algorithm, it locates the closest package.json, starting its search from the current working directory (process.cwd() by default) or any directory specified by the user.

How do you use pkg-up?

The utilization of "pkg-up" is straightforward and conveniently done within your JavaScript environment. To begin, install the package into your project using npm install pkg-up. Following a successful installation, you then import the package into your JavaScript file with import {pkgUp} from 'pkg-up';. By executing console.log(await pkgUp());, the closest package.json file path relative to your current working directory will be logged to your console as a string. In instances where the package.json file cannot be found, the promise will resolve to undefined. The package also provides a synchronous method, pkgUpSync(options), which follows the same process but without returning a promise. Here is an example of its usage:

// Import pkg-up
import {pkgUp} from 'pkg-up';

// Use pkg-up to find and print the path of the closest package.json file
console.log(await pkgUp());

// This could possibly print out: '/Users/sindresorhus/foo/package.json'

The pkgUp() and pkgUpSync() methods both accept an optional object parameter that allows you to specify the "cwd" (current working directory) from where the search should commence.

Where are the pkg-up docs?

The official documentation for "pkg-up" is available within the readme content on its GitHub repository page at https://github.com/sindresorhus/pkg-up. You'll find a detailed breakdown of its API, including usage examples and the options available for customizing the package's behavior.