# quick-promise

> QuickPromise. Resolve Synchronously When Possible.

Latest version **0.1.0** (published 2023-03-13) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install quick-promise
pnpm add quick-promise
yarn add quick-promise
bun add quick-promise
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-03-13 |
| First published | 2023-03-13 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | async, main, promise, sync, thread |

## Links

- npm: https://www.npmjs.com/package/quick-promise
- Repository: https://github.com/DanielJDufour/quick-promise
- Homepage: https://github.com/DanielJDufour/quick-promise#readme
- Issues: https://github.com/DanielJDufour/quick-promise/issues
- npm.io page: https://npm.io/package/quick-promise

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2023-03-13

## README

# quick-promise
QuickPromise.  Resolve Synchronously When Possible.

# usage
```js
import QuickPromise from "quick-promise";
```

## QuickPromise.all
```js
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
```js
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
```

---
_Source: https://npm.io/package/quick-promise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
