resolve-version
Resolve version of an installed module.
Install
$ npm i resolve-version
Usage
const resolveVersion = require('resolve-version');
resolveVersion('yarn');
API
resolveVersion (module)
Resolves and returns the version of a module, first checking locally, then globally.
Returns undefined
if fails.
resolveVersion.local (module, options?)
Resolves and returns the local version of a module.
resolveVersion.global (module, options?)
Resolves and returns the global version of a module.
module
Type: string
Module you want to get version of.
options
Type: object
silent
Type: boolean
Default: false
Returns undefined
instead of throwing error if the module was not found.
License
MIT