Calls a function repeatedly while a condition returns true and then resolves the promise
$ npm install --save promise-whilst
const promiseWhilst = ;let count = 0;;
action repeatedly while
true and then resolves the promise.Rejects if
action returns a promise that rejects or if an error is thrown anywhere.
Should return a boolean of whether to continue.
Action to run for each iteration.
You can return a promise and it will be handled.
MIT © Sindre Sorhus