UNPKG

@ces/sync

Version:

A function that gets values synchronically from observables that emit synchronically.

9 lines (8 loc) 280 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = void 0; exports.sync = function (synchronousObservable) { var result; synchronousObservable.subscribe(function (val) { return result = val; }).unsubscribe(); return result; };