1.1.0 • Published 3 years ago

which-version v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

which-version

Get the current version of a module.

Installation

Use the package manager npm to install it.

npm install which-version

Usage

Import the method and use,

const getVersion = require("which-version").getVersion;
getVersion();
// => 1.1.0
  • To get the name as well as version, use getInfo method
const { name, version } = require("which-version").getInfo();

CLI

If you are inside a module or project, simply find the version in command line using npx,

npx which-version
//=> module-name :: 1.1.0