1.0.0 • Published 5 years ago

tallbag-from-promise v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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