# callbag-from-promise

> Convert a Promise to a callbag listenable source

Latest version **1.3.0** (published 2019-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install callbag-from-promise
pnpm add callbag-from-promise
yarn add callbag-from-promise
bun add callbag-from-promise
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2019-07-25 |
| First published | 2018-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | staltz.com |
| Maintainers | staltz, zimme |
| Keywords | callbag |

## Links

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

## Dependencies (1)

- [callbag](https://npm.io/package/callbag.md) ^1.1.0

## Recent versions

- 1.3.0 (latest) — 2019-07-25
- 1.2.0 — 2019-02-09
- 1.1.0 — 2018-11-13
- 1.0.0 — 2018-01-30

## README

# callbag-from-promise

Convert a Promise to a callbag listenable source.

`npm install callbag-from-promise`

## example

```js
const fromPromise = require('callbag-from-promise');
const observe = require('callbag-observe');

const source = fromPromise(
  fetch('http://jsonplaceholder.typicode.com/users/1')
    .then(res => res.json())
);

observe(user => console.log(user.name))(source); // Leanne Graham
```

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