Skip to content

Instantly share code, notes, and snippets.

@pdcgomes
Created October 25, 2013 15:28
Show Gist options
  • Save pdcgomes/7156546 to your computer and use it in GitHub Desktop.
Save pdcgomes/7156546 to your computer and use it in GitHub Desktop.
async.whilst(
() =>
return taskHasCompleted is false or iterations > 0
(callback) =>
fetchEvents(msg, api_user, 1, limit,
(results) =>
filtered_data = filterFunction(results)
iterations--
callback()
(error) => callback(error)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment