which-package-manager
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i which-package-manager

Weekly Downloads

149,643

Version

1.0.1

License

MIT

Unpacked Size

15.4 kB

Total Files

5

Last publish

Collaborators

  • mshima