get-package-manager
v1.0.4
Published
Get installed node package manager
Downloads
5
Maintainers
Readme
Installation
npm i get-package-manager
or
yarn add get-package-manager
Usage
To get installed package manager run:
import { getPackageManager } from 'get-package-manager'
const pkg = getPackageManager()
console.log(pkg) // logs npm|yarn|pnpm
To get preferred package manager use:
const pkg = getPackageManager({ prefer: 'npm'})
console.log(pkg) // logs npm
License
MIT