Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

observable-to-promise

Convert an Observable to a Promise

Install

$ npm install observable-to-promise

Usage

const observableToPromise = require('observable-to-promise');

(async () => {
	const promise = observableToPromise(Observable.of(1, 2));

	console.log(await promise);
	//=> [1, 2]
})();

Related