Home

Awesome

observable-to-promise

Convert an Observable to a Promise

Install

npm install observable-to-promise

Usage

import observableToPromise from 'observable-to-promise';

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

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

Related