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

which-pm-runs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-pm-runs

Detects what package manager executes the process

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-18.5%
Maintainers
1
Weekly downloads
 
Created

What is which-pm-runs?

The `which-pm-runs` npm package is designed to identify which package manager was used to invoke a script. This can be particularly useful in scenarios where scripts need to behave differently depending on the package manager (npm, yarn, pnpm, etc.) that is running them. It provides a simple API to detect the current package manager and can be used in various Node.js scripts to enhance cross-package manager compatibility.

What are which-pm-runs's main functionalities?

Detecting the package manager

This feature allows you to detect which package manager is currently running the script. The function returns an object containing the name and version of the package manager. This can be useful for scripts that need to adjust their behavior based on the package manager, such as using different command-line options or handling lock files differently.

const whichPMRuns = require('which-pm-runs');
console.log(whichPMRuns());

Other packages similar to which-pm-runs

Keywords

FAQs

Package last updated on 18 Feb 2022

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