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

p-min-delay

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-min-delay - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

7

index.js
import delay from 'yoctodelay';
export default async function pMinDelay(promise, minimumDelay, {delayRejection = true} = {}) {
await Promise[delayRejection ? 'allSettled' : 'all']([
promise,
delay(minimumDelay)
]);
const delayPromise = delay(minimumDelay);
await (delayRejection ? delayPromise : Promise.all([promise, delayPromise]));
return promise;
}
{
"name": "p-min-delay",
"version": "4.0.1",
"version": "4.0.2",
"description": "Delay a promise a minimum amount of time",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -11,5 +11,5 @@ # p-min-delay

```sh
npm install p-min-delay
```
$ npm install p-min-delay
```

@@ -16,0 +16,0 @@ ## Usage

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