Socket
Socket
Sign inDemoInstall

@pnpm/dependency-path

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/dependency-path

Utilities for working with symlinked node_modules


Version published
Weekly downloads
373K
increased by6.63%
Maintainers
2
Weekly downloads
 
Created

What is @pnpm/dependency-path?

@pnpm/dependency-path is a utility package designed to handle and manipulate dependency paths in a consistent manner. It is particularly useful for package managers and tools that need to resolve and manage dependencies efficiently.

What are @pnpm/dependency-path's main functionalities?

Create Dependency Path

This feature allows you to create a dependency path given a root directory, package name, and version. It helps in standardizing the way dependency paths are generated.

const { createDependencyPath } = require('@pnpm/dependency-path');
const depPath = createDependencyPath('/root/project', 'lodash', '4.17.21');
console.log(depPath);

Parse Dependency Path

This feature parses a given dependency path and extracts useful information such as the package name and version. It is useful for analyzing and understanding the structure of dependency paths.

const { parseDependencyPath } = require('@pnpm/dependency-path');
const parsed = parseDependencyPath('/root/project/node_modules/lodash@4.17.21');
console.log(parsed);

Get Package Name from Path

This feature extracts the package name from a given dependency path. It simplifies the process of identifying packages from their paths.

const { getPackageNameFromPath } = require('@pnpm/dependency-path');
const packageName = getPackageNameFromPath('/root/project/node_modules/lodash@4.17.21');
console.log(packageName);

Other packages similar to @pnpm/dependency-path

Keywords

FAQs

Package last updated on 09 Apr 2024

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