# resable-promise

> Simple promise subclass, allowing for resolvement outside of callback (as property).

Latest version **1.0.0** (published 2023-03-02) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-03-02 |
| First published | 2023-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | maximilianMairinger |
| Maintainers | zzrv |
| Keywords | resolve, able, resable, promise, utility |

## Links

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

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-03-02
- 0.0.1 — 2023-03-02

## README

# Resable promise

Simple promise subclass, allowing for resolvement outside of callback (as property).

## Installation

```shell
 $ npm i resable-promise
```

## Usage

Do this:

```ts
import ResablePromise from "resable-promise"

const prom = new ResablePromise()
// later...
prom.res()
```

So you dont have to do this:

```ts
let promRes
const prom = new Promise(res => promRes = res)
// later ...
promRes()
```

Only convinience, as I see myself doing this a lot. And this provides type safety without effort.

### On Settled

Is a promise that resolves when the base promise is ether resolved or rejected.

```ts
const prom = new ResablePromise()

prom.settled.then(() => console.log("settled"))
```


## Contribute

All feedback is appreciated. Create a pull request or write an issue.

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