Socket
Socket
Sign inDemoInstall

which-pm

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-pm

Detects what package manager was used for installation


Version published
Maintainers
1
Created

What is which-pm?

The 'which-pm' npm package is designed to detect which package manager was used to install the current project. This can be particularly useful in environments where multiple package managers (like npm, yarn, or pnpm) might be used across different projects. It helps in scripting and automation by allowing the script to adapt based on the package manager used.

What are which-pm's main functionalities?

Detect package manager

This feature allows you to detect which package manager was used for the current project. The function takes the current working directory as an argument and returns a promise that resolves with the name of the package manager.

const whichPM = require('which-pm');

whichPM(process.cwd()).then(pm => {
  console.log(`This project uses ${pm.name}`);
});

Other packages similar to which-pm

Keywords

FAQs

Package last updated on 15 May 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