Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 639 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 639 Bytes

npm-version-exists

Check if the specified package version exists on npm

Installation

  yarn add npm-version-exists

Usage

  const nve = require('npm-version-exists')
  nve({
    name: 'npm-version-exists',
    version: '0.0.1'
  })
    .then(exists => console.log(exists)) //returns bool
    .catch(err => console.log(err))
  const nve = require('npm-version-exists')

  nve({
    name: 'npm-version-exists',
    version: '0.0.1',
    token: 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'
  },)
    .then(exists => console.log(exists)) //returns bool
    .catch(err => console.log(err))