Socket
Socket
Sign inDemoInstall

version-exists

Package Overview
Dependencies
46
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    version-exists

Check if version of a NPM module exists


Version published
Weekly downloads
53
decreased by-45.36%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

version-exists Build Status

Check if a version for a NPM modul exists.

Install

$ npm install --save version-exists

Usage

const versionExists = require('version-exists')

versionExists('args', '2.6.0').then(exists => console.log(exists)) //=> true
versionExists('args', '99.6.0').then(exists => console.log(exists)) //=> false
versionExists('argsfkgmnghjghjrihgjkrg', '2.6.0').then(exists => console.log(exists)) //=> Error > Cannot find argsfkgmnghjghjrihgjkrg in the NPM registry

API

versionExists(module, version)

Returns a promise for a boolean.

module

Type: String

Module to check.

version

Type: String

Version you want to check.

CLI

Install

$ npm install -g version-exists
❯ version-exists args 2.6.0

    Version 2.6.0 of the module args exist!
  

❯ version-exists args 99.6.0

    Version 99.6.0 of the module args does not exist!
  

❯ version-exists arsdgfghdhtdhtzjnrzjnrzjrjgs 2.6.0

    Error > Cannot find arsdgfghdhtdhtzjnrzjnrzjrjgs in the NPM registry

License

MIT © Marvin Mieth

Keywords

FAQs

Last updated on 03 Feb 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc