Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolve-version

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-version

Resolve version of an installed module.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
increased by28.11%
Maintainers
1
Weekly downloads
 
Created
Source

resolve-version

Resolve version of an installed module.

Install

$ npm i resolve-version

Usage

const resolveVersion = require('resolve-version');

resolveVersion('yarn'); // <= '1.22.19'

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

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc