Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mheob/used-pm
Detects what package manager executes the process
https://github.com/mheob/used-pm
hacktoberfest npm package-manager pnpm yarn
Last synced: 1 day ago
JSON representation
Detects what package manager executes the process
- Host: GitHub
- URL: https://github.com/mheob/used-pm
- Owner: mheob
- License: mit
- Created: 2022-12-02T08:17:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T08:14:51.000Z (9 days ago)
- Last Synced: 2025-01-07T15:32:33.385Z (7 days ago)
- Topics: hacktoberfest, npm, package-manager, pnpm, yarn
- Language: TypeScript
- Homepage:
- Size: 766 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# `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:
```sh
npm install used-pm
```or
```sh
yarn add used-pm
```or
```sh
pnpm add used-pm
```or
```sh
bun add used-pm
```## Usage
In `esm`:
```js
import currentPackageManager from 'used-pm';const { name, version } = currentPackageManager();
```In `commonjs`:
```js
const currentPackageManager = require('used-pm');const { name, version } = currentPackageManager();
```