Check whether a package name is available on npm
$ npm install --save npm-name
const npmName = require('npm-name');
npmName('chalk').then(available => {
console.log(available);
//=> false
});
- npm-name-cli - CLI for this module
MIT © Sindre Sorhus