Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

pkg-up

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

pkg-up

Find the closest package.json file

    4.0.0latest
    Github

Version published
Maintainers
1
Weekly downloads
9,780,609
increased by6.82%

Weekly downloads

Readme

Source

pkg-up

Find the closest package.json file

Install

npm install pkg-up

Usage

/ └── Users └── sindresorhus └── foo ├── package.json └── bar ├── baz └── example.js // example.js import {pkgUp} from 'pkg-up'; console.log(await pkgUp()); //=> '/Users/sindresorhus/foo/package.json'

API

pkgUp(options?)

Returns a Promise<string> for the file path, or Promise<undefined> if it could not be found.

pkgUpSync(options?)

Returns the file path, or undefined if it could not be found.

options

Type: object

cwd

Type: string
Default: process.cwd()

The directory to start from.

  • read-pkg-up - Read the closest package.json file
  • pkg-dir - Find the root directory of an npm package
  • find-up - Find a file by walking up parent directories

Keywords

FAQs

What is pkg-up?

Find the closest package.json file

Is pkg-up popular?

The npm package pkg-up receives a total of 9,365,398 weekly downloads. As such, pkg-up popularity was classified as popular.

Is pkg-up well maintained?

We found that pkg-up demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 04 Nov 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc