UNPKG

rimmel

Version:

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

10 lines (8 loc) 422 B
/** * Get the current value from the given object if it's a BehaviorSubject, otherwise undefined */ const currentValue = (stream) => // FIXME: this relies on a piped BehaviorSubject exposing source and destination, which might not be supported in future releases stream?.value ?? (stream?.destination ? currentValue(stream?.destination) : undefined); export { currentValue }; //# sourceMappingURL=current-value.js.map