Check if an NPM package name is taken.
$ npm install --save is-taken
const isTaken = require('is-taken')
// version is optional
isTaken('webpack', {version: 'x.x.x'})
.then(taken => {
if (taken) {
console.log(`${taken.name} is taken 😭`)
} else {
console.log('Cheers! it belongs to you! 🎉')
}
})
MIT © EGOIST