UNPKG

rimmel

Version:

A Streams-Oriented UI library for the Rx.Observable Universe

20 lines (17 loc) 642 B
import { isFunction } from '../utils/is-function.js'; import '../constants.js'; /** * Checks whether the provided template expression is an Observer (Rx Subscribable) * @param expression a template expression to check * @returns is ObserverSourceHandler */ const isObserverSource = (expression) => isFunction(expression?.next); /** * A data source that connects to and feeds an Observer stream or RxJS Subject * * @param handler an Observer stream or RxJS Subject * @returns */ const ObserverSource = (handler) => handler.next.bind(handler); export { ObserverSource, isObserverSource }; //# sourceMappingURL=observer-source.js.map