Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

which-package-manager

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-package-manager

Detect which package manager is used in the current project

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
164K
8.31%
Maintainers
1
Weekly downloads
 
Created
Source

which-package-manager

Detects the current package manager. Rules applied in order:

  • Lock file existence.
  • package.json structure compatibility.
  • packageManager field.
  • First compatible passed preferred package manager.

Usage

npm install which-package-manager
import { whichPackageManager } from 'which-package-manager';

const packageManager = await whichPackageManager();

License

MIT

Keywords

pm

FAQs

Package last updated on 25 Mar 2025

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