npm.io
1.3.4 • Published 3 years ago

@node-kit/pm-info

Licence
MIT
Version
1.3.4
Deps
1
Size
10 kB
Vulns
0
Weekly
0
Stars
26
DeprecatedThis package is deprecated

@node-kit/pm-info

A simple utility to get the package manager information which used in the project

NPM version Codacy Badge Test coverage License

Sonar

Install

# use pnpm
$ pnpm install -D @node-kit/pm-info

# use yarn
$ yarn add -D @node-kit/pm-info

# use npm
$ npm install -D @node-kit/pm-info

Usage

  1. use @node-kit/pm-info in async mode s
import { pmInfo } from '@node-kit/pm-info'

pmInfo().then(info => {
  console.log('The package manager is: ', info) // { name: 'pnpm', version: '7.25.0' } | null
})
  1. use @node-kit/pm-info in sync mode
import { pmInfoSync } from '@node-kit/pm-info'

console.log('The package manager is: ', pmInfoSync()) // { name: 'pnpm', version: '7.25.0' } | null

Issues & Support

Please open an issue here.

License

MIT

Keywords