npm-cli-version

1.0.0 • Public • Published

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

Dependents (4)

Package Sidebar

Install

npm i npm-cli-version

Weekly Downloads

582

Version

1.0.0

License

ISC

Unpacked Size

3.61 kB

Total Files

4

Last publish

Collaborators

  • shinnn