Check if the specified package version exists on npm
yarn add npm-version-exists
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))