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

1.0.0 • Public • Published

tallbag-from-promise

Convert a Promise to a tallbag listenable source.

npm install tallbag-from-promise

example

const fromPromise = require('tallbag-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 tallbag-from-promise

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

7.6 kB

Total Files

8

Last publish

Collaborators

  • staltz