{"action":"opened","issue":{"url":"https://api.github.com/repos/sindresorhus/npm-name/issues/13","repository_url":"https://api.github.com/repos/sindresorhus/npm-name","labels_url":"https://api.github.com/repos/sindresorhus/npm-name/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/npm-name/issues/13/comments","events_url":"https://api.github.com/repos/sindresorhus/npm-name/issues/13/events","html_url":"https://github.com/sindresorhus/npm-name/issues/13","id":282359990,"number":13,"title":"Flaky results, especially with `pinto`","user":{"login":"citycide","id":16605186,"avatar_url":"https://avatars2.githubusercontent.com/u/16605186?v=4","gravatar_id":"","url":"https://api.github.com/users/citycide","html_url":"https://github.com/citycide","followers_url":"https://api.github.com/users/citycide/followers","following_url":"https://api.github.com/users/citycide/following{/other_user}","gists_url":"https://api.github.com/users/citycide/gists{/gist_id}","starred_url":"https://api.github.com/users/citycide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citycide/subscriptions","organizations_url":"https://api.github.com/users/citycide/orgs","repos_url":"https://api.github.com/users/citycide/repos","events_url":"https://api.github.com/users/citycide/events{/privacy}","received_events_url":"https://api.github.com/users/citycide/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-15T09:00:38Z","updated_at":"2017-12-15T09:00:38Z","closed_at":null,"author_association":"NONE","body":"[`pinto`](https://www.npmjs.com/package/pinto) - at time of writing - isn't take on npm. The results for this specific word are _super_ flaky though, and I don't know why. It fails about 80% of the time, returning `false` when it should obviously return `true` since it's available. There don't seem to be any errors.\r\n\r\nYou can run the below code in this [RunKit notebook](https://runkit.com/citycide/npm-name-flakiness).\r\n\r\n```js\r\nconst isAvailable = require('npm-name')\r\nconst partition = require('lodash.partition')\r\n\r\nconst fetch = word => {\r\n  const array = new Array(100).fill(word)\r\n  return Promise.all(array.map(isAvailable))\r\n    .then(names => partition(names, Boolean))\r\n}\r\n\r\nconst test = async word => {\r\n  const [avail, not] = await fetch(word)\r\n  console.log(`${word}: ${avail.length} / ${not.length}`)\r\n}\r\n\r\nawait test('pinto')\r\n```"}}
{"actor":{"display_login":"citycide"}}