# promise-status-async

> Promise status management tool

Latest version **1.2.10** (published 2021-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-status-async
pnpm add promise-status-async
yarn add promise-status-async
bun add promise-status-async
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.10 |
| Published | 2021-11-07 |
| First published | 2018-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Artem Kudla |
| Maintainers | kudla |
| Keywords | promise, status, async, tool, es6, es2015, ts, typescript |

## Links

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

## 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

- 1.2.10 (latest) — 2021-11-07
- 1.2.9 — 2021-09-16
- 1.2.8 — 2021-09-16
- 1.2.7 — 2021-09-16
- 1.2.6 — 2021-09-16
- 1.2.4 — 2021-09-16
- 1.2.3 — 2021-09-15
- 1.2.0 — 2021-09-15
- 1.1.11 — 2020-01-17
- 1.1.10 — 2019-12-18
- 1.1.9 — 2018-11-29
- 1.1.8 — 2018-11-29
- 1.1.7 — 2018-11-19
- 1.1.6 — 2018-11-17
- 1.1.5 — 2018-11-11
- … 10 more at https://npm.io/package/promise-status-async/versions

## README

# promise-status-async
Promise status management tool

<img src="promise-status.jpg" alt="promise status logo" width="140">
<img src="https://goo.gl/PkiXwP" alt=" " width="0" height="0">

## Install
```bash
npm install promise-status-async
```

## API
Follow [promise-status-async API](API.md) for more details.

## Usage example
```js
import {
    PromiseStatuses,
    PROMISE_RESOLVED,
    promiseStatus,
    promiseState,
    isPromiseResolved,
    isPromiseNotRejected
} from 'promise-status-async';

const pendingPromise = new Promise(() => {});
const resolvedPromise = Promise.resolve('some value');
const rejectedPromise = Promise.reject('some reason');

(async function usageExample () {
    console.log(await promiseStatus(pendingPromise));
    // pending

    console.log(await promiseStatus(rejectedPromise) === PromiseStatuses.PROMISE_REJECTED);
    // true

    console.log(await promiseStatus(resolvedPromise) === PROMISE_RESOLVED);
    // true

    console.log(await promiseState(resolvedPromise));
    // {status: "resolved", value: "some value"}

    console.log(await isPromiseResolved(pendingPromise));
    // false

    console.log(await isPromiseNotRejected(resolvedPromise));
    // true
})();
```

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