cfp
callbag-from-promise
npm i callbag-from-promise
cfp

callbag-from-promise

👜 Convert a Promise to a callbag listenable source

by André Staltz

1.3.0 (see all)License:MITTypeScript:Built-In
npm i callbag-from-promise
Readme

callbag-from-promise

Convert a Promise to a callbag listenable source.

npm install callbag-from-promise

example

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

Downloads/wk

1.1K

GitHub Stars

4

LAST COMMIT

3yrs ago

MAINTAINERS

2

CONTRIBUTORS

4

OPEN ISSUES

0

OPEN PRs

2
VersionTagPublished
1.3.0
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate