Socket
Socket
Sign inDemoInstall

resolve-pkg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-pkg

Resolve the path of a package regardless of it having an entry point


Version published
Weekly downloads
1.1M
decreased by-18.98%
Maintainers
1
Weekly downloads
 
Created

What is resolve-pkg?

The resolve-pkg npm package is used to resolve the path of a package regardless of where it is located in the node_modules hierarchy. This is particularly useful in monorepos or when dealing with nested dependencies.

What are resolve-pkg's main functionalities?

Resolve Package Path

This feature allows you to resolve the absolute path of a package. The code sample demonstrates how to use resolve-pkg to find the path of 'some-package'.

const resolvePkg = require('resolve-pkg');
const packagePath = resolvePkg('some-package');
console.log(packagePath);

Resolve Package Path with CWD

This feature allows you to resolve the package path starting from a specific directory. The code sample shows how to specify a custom current working directory (cwd) for the search.

const resolvePkg = require('resolve-pkg');
const packagePath = resolvePkg('some-package', { cwd: '/path/to/start/search' });
console.log(packagePath);

Other packages similar to resolve-pkg

Keywords

FAQs

Package last updated on 16 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc