resolve-when
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -0,1 +1,9 @@ | ||
/** | ||
* Returns a promise that resolves once condition is met | ||
* | ||
* @param {function} condition - Return `true` to cause resolveWhen to resolve | ||
* @param {Object} options | ||
* @param {Number} options.max - The maximum number of times that `condition` should run | ||
* @param {Number} options.interval - Time, in milliseconds, to wait between running `condition` | ||
*/ | ||
function resolveWhen(condition = () => true, { max, interval = 50 } = {}) { | ||
@@ -2,0 +10,0 @@ return new Promise((resolve, reject) => { |
{ | ||
"name": "resolve-when", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Returns a promise that resolves once condition is met", | ||
@@ -5,0 +5,0 @@ "author": { |
6703
23