# inverted-promise

> When you want to resolve/reject a promise from the outside

Latest version **1.0.1** (published 2020-06-16) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-06-16 |
| First published | 2020-06-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Emil Bay |
| Maintainers | emilbayes |

## Links

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

## Recent versions

- 1.0.1 (latest) — 2020-06-16

## README

# `inverted-promise`

[![Build Status](https://travis-ci.org/emilbayes/inverted-promise.svg?branch=master)](https://travis-ci.org/emilbayes/inverted-promise)

> When you want to resolve/reject a promise from the outside

## Usage

```js
var InvertedPromise = require('inverted-promise')

var iP = new InvertedPromise()

var iP2 = new InvertedPromise()

iP.then((value) => {
  console.log(value)
})

iP2.catch((err) => {
  console.log(err)
})

iP.resolve('Hello')
iP2.reject('World')
```

## API

### `const ip = new InvertedPromise()`

Create a new `InvertedPromise`

### `ip.resolve(value)`

Resolve the promise

### `ip.reject(error)`

Reject the promise

## Install

```sh
npm install inverted-promise
```

## License

[ISC](LICENSE)

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