used-pm
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

used-pm - What package manager is used?

Lightweight script to detect which package manager executes the current process.

Currently, only the package manager bun, npm, yarn and pnpm are supported.

Installation

Use your favorite package manager to install used-pm. For example:

npm install used-pm

or

yarn add used-pm

or

pnpm add used-pm

or

bun add used-pm

Usage

In esm:

import currentPackageManager from 'used-pm';

const { name, version } = currentPackageManager();

In commonjs:

const currentPackageManager = require('used-pm');

const { name, version } = currentPackageManager();

Package Sidebar

Install

npm i used-pm

Weekly Downloads

6

Version

1.1.1

License

MIT

Unpacked Size

5.47 kB

Total Files

7

Last publish

Collaborators

  • mheob