callbag-from-promise
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i callbag-from-promise

Weekly Downloads

372

Version

1.3.0

License

MIT

Unpacked Size

7.83 kB

Total Files

8

Last publish

Collaborators

  • staltz
  • zimme