Skip to content

Instantly share code, notes, and snippets.

@implicit-invocation
Created January 9, 2019 08:47
Show Gist options
  • Save implicit-invocation/4dc352ed467ecbf1cf2dad9d3fdce465 to your computer and use it in GitHub Desktop.
Save implicit-invocation/4dc352ed467ecbf1cf2dad9d3fdce465 to your computer and use it in GitHub Desktop.
const getRepos = (username, cb) => {
setTimeout(() => {
cb([`${username}#1`, `${username}#2`, `${username}#3`, `${username}#4`]);
}, Math.random() * 1000);
};
const getAllRepos = (usernames, cb) => {};
getAllRepos(['google', 'Facebook', 'github'], allRepos =>
console.log(allRepos)
);
// { "google": [], "facebook": []}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment