You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

quick-promise

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quick-promise

QuickPromise. Resolve Synchronously When Possible.

0.1.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

quick-promise

QuickPromise. Resolve Synchronously When Possible.

usage

import QuickPromise from "quick-promise";

QuickPromise.all

let resolved = false;
QuickPromise.all([1, 2]).then(nums => (resolved = true));
// resolved is true

let resolved = false;
QuickPromise.all([fetch(url), 9]).then([response, n]) => (resolved = true));
// resolved is false

QuickPromise.resolve

let resolved = false;
QuickPromise.resolve(1).then(num => (resolved = true));
// resolved is true

let resolved = false;
QuickPromise.resolve(fetch(url)).then(response => (resolved = true));
// resolved is false

let resolved = false;
await QuickPromise.resolve(fetch(url)).then(response => (resolved = true));
// resolved is true

Keywords

async

FAQs

Package last updated on 13 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts