This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Retry a Promise until success or max tries exceeded. | |
| * | |
| * @param factory {Function} A function that generates the Promise to try. | |
| * @param validator {Function} A function that resolves if the result from `factory` is valid, | |
| * and throws an error if the result is invalid. | |
| * @param tries {Integer} The max number of attempts. | |
| * @param delay {Integer} The first amount of time to wait between attempts, in milliseconds. | |
| * Subsequent attempts will wait exponentially more time. | |
| * @returns {Promise} A Promise that resolves to the result of `factory`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am sierranevadan on github. | |
| * I am grantkelly (https://keybase.io/grantkelly) on keybase. | |
| * I have a public key whose fingerprint is E26B 4DEC 404E 44FC 60A1 FA39 A0BB C5B6 EA86 785E | |
| To claim this, I am signing this object: |