rimmel
Version:
A Streams-Oriented UI library for the Rx.Observable Universe
13 lines (10 loc) • 381 B
JavaScript
import '../constants.js';
const isObserver = (x) =>
// FIXME: it should actually be x?.next || x?.error || x?.complete
// or a function
!!x?.next;
const isObservable = (x) => !!x?.subscribe;
const isPromise = (x) => !!x?.then;
const isFuture = (x) => isPromise(x) || isObservable(x);
export { isFuture, isObservable, isObserver, isPromise };
//# sourceMappingURL=futures.js.map