Comparing version 4.2.7 to 4.2.8
@@ -87,2 +87,22 @@ 'use strict'; | ||
static delay(timeout, value) { | ||
return new Promish(resolve => { | ||
setTimeout(function() { | ||
resolve(value); | ||
}, timeout); | ||
}); | ||
} | ||
static resolve(value) { | ||
return new Promish(resolve => { | ||
resolve(value); | ||
}); | ||
} | ||
static reject(error) { | ||
return new Promish((resolve, reject) => { | ||
reject(error); | ||
}); | ||
} | ||
// Wrap a synchronous method and resolve with its return value | ||
@@ -199,2 +219,6 @@ static method(f) { | ||
static all(promises) { | ||
return new Promish(Promise.all(promises)); | ||
} | ||
// some - the first n to resolve, win - else reject with all of the errors | ||
@@ -201,0 +225,0 @@ static some(promises, n) { |
{ | ||
"name": "promish", | ||
"version": "4.2.7", | ||
"version": "4.2.8", | ||
"description": "ES6 Promise Shim", | ||
@@ -5,0 +5,0 @@ "private": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21313
240