# currently-unhandled

> Track the list of currently unhandled promise rejections.

Latest version **0.4.1** (published 2016-06-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install currently-unhandled
pnpm add currently-unhandled
yarn add currently-unhandled
bun add currently-unhandled
```

## 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.4.1 |
| Published | 2016-06-02 |
| First published | 2016-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | James Talmage |
| Maintainers | jamestalmage |
| Keywords | unhandled, unhandledRejection, rejected, promises |

## Links

- npm: https://www.npmjs.com/package/currently-unhandled
- Repository: https://github.com/jamestalmage/currently-unhandled
- Homepage: https://github.com/jamestalmage/currently-unhandled#readme
- Issues: https://github.com/jamestalmage/currently-unhandled/issues
- npm.io page: https://npm.io/package/currently-unhandled

## Dependencies (1)

- [array-find-index](https://npm.io/package/array-find-index.md) ^1.0.1

## Alternatives

- [@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
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.4.1 (latest) — 2016-06-02
- 0.4.0 — 2016-06-02
- 0.3.0 — 2016-06-02

## README

# currently-unhandled [![Build Status](https://travis-ci.org/jamestalmage/currently-unhandled.svg?branch=master)](https://travis-ci.org/jamestalmage/currently-unhandled) [![Coverage Status](https://coveralls.io/repos/github/jamestalmage/currently-unhandled/badge.svg?branch=master)](https://coveralls.io/github/jamestalmage/currently-unhandled?branch=master)

> Track the list of currently unhandled promise rejections.


## Install

```
$ npm install --save currently-unhandled
```


## Usage

```js
const currentlyUnhandled = require('currently-unhandled')(); // <- note the invocation

var fooError = new Error('foo');
var p = Promise.reject(new Error('foo'));

// on the next tick - unhandled rejected promise is added to the list:
currentlyUnhandled();
//=> [{promise: p, reason: fooError}]'

p.catch(() => {});

// on the next tick - handled promise is now removed from the list:
currentlyUnhandled();
//=> [];
```

## API

### currentlyUnhandled()

Returns an array of objects with `promise` and `reason` properties representing the rejected promises that currently do not have a rejection handler. The list grows and shrinks as unhandledRejections are published, and later handled.

## Browser Support

This module can be bundled with `browserify`. At time of writing, it will work with native Promises in the Chrome browser only. For best cross-browser support, use `bluebird` instead of native Promise support in browsers.

## License

MIT © [James Talmage](http://github.com/jamestalmage)

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