Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

delay

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delay - npm Package Compare versions

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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc