const isAvailable = require('npm-name')
const partition = require('lodash.partition')
const fetch = word => {
const array = new Array(100).fill(word)
return Promise.all(array.map(isAvailable))
.then(names => partition(names, Boolean))
}
const test = async word => {
const [avail, not] = await fetch(word)
console.log(`${word}: ${avail.length} true / ${not.length} false`)
}
await test('pinto')