Skip to content

๐Ÿ‘œ Convert a Promise to a callbag listenable source

License

Notifications You must be signed in to change notification settings

staltz/callbag-from-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

๐Ÿ‘œ Convert a Promise to a callbag listenable source

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •