Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
increased by0.89%
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 13 Jan 2017

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