1.0.0 • Published 6 years ago

npm-cli-version v1.0.0

Weekly downloads
492
License
ISC
Repository
github
Last release
6 years ago

npm-cli-version

npm version Build Status Build status Coverage Status

Get the currently installed npm CLI version

const npmCliVersion = require('npm-cli-version');

(async () => {
  await npmCliVersion(); //=> '5.5.1'
})();

Unlike the prior arts, it doesn't execute npm --version in a child process.

Installation

Use npm.

npm install npm-cli-version

API

const npmCliVersion = require('npm-cli-version');

npmCliVersion()

Return: Promise<string>

Related projects

License

ISC License © 2018 Shinnosuke Watanabe