Use npm-name
instead.
Check whether a package name is available on npm and bower
$ npm install --save pkg-name
var pkgName = require('pkg-name');
pkgName('chalk', function (err, available) {
console.log(available);
//=> {npm: false, bower: false}
});
$ npm install --global pkg-name
$ pkg-name --help
Usage
$ pkg-name <name>
Examples
$ bower-name multiline
✖ Unavailable
$ bower-name unicorn-cake
✔ Available
MIT © Sindre Sorhus