Comparing version 4.4.1 to 5.0.0
13
index.js
@@ -60,13 +60,14 @@ 'use strict'; | ||
const delay = createDelay({willResolve: true}); | ||
delay.reject = createDelay({willResolve: false}); | ||
delay.range = (minimum, maximum, options) => delay(randomInteger(minimum, maximum), options); | ||
delay.createWithTimers = ({clearTimeout, setTimeout}) => { | ||
const delay = createDelay({clearTimeout, setTimeout, willResolve: true}); | ||
delay.reject = createDelay({clearTimeout, setTimeout, willResolve: false}); | ||
const createWithTimers = clearAndSet => { | ||
const delay = createDelay({...clearAndSet, willResolve: true}); | ||
delay.reject = createDelay({...clearAndSet, willResolve: false}); | ||
delay.range = (minimum, maximum, options) => delay(randomInteger(minimum, maximum), options); | ||
return delay; | ||
}; | ||
const delay = createWithTimers(); | ||
delay.createWithTimers = createWithTimers; | ||
module.exports = delay; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = delay; |
{ | ||
"name": "delay", | ||
"version": "4.4.1", | ||
"version": "5.0.0", | ||
"description": "Delay a promise a specified amount of time", | ||
@@ -14,3 +14,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=10" | ||
}, | ||
@@ -17,0 +17,0 @@ "scripts": { |
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
11168