Options
All
  • Public
  • Public/Protected
  • All
Menu

Package muster-observable

Muster Observable

A simple TC39-compliant stream library with a functional API

Usage example:

import { Observable, map, filter } from '@dws/muster-observable';

const inputStream = Observable.from(['foo', 'bar', 'baz', 'qux']); const filteredStream = filter((value) => value.startsWith('b'), inputStream); const uppercaseStream = map((value) => value.toUpperCase(), filteredStream);

const subscription = uppercaseStream.subscribe(console.log); // Logs "BAR" and "BAZ"

subscription.unsubscribe();

Index

Type aliases

DisposeCallback

DisposeCallback: function

Type declaration

    • (): void
    • Returns void

Stream

Stream: ObservableLike<T>

Variables

Const PENDING

PENDING: never = {} as never

Functions

catchError

combineArray

combineLatest

create

  • Type parameters

    • T

    Parameters

    • factory: function
        • (next: function, complete: function, error: function): DisposeCallback | void
        • Parameters

          • next: function
              • (value: T): void
              • Parameters

                • value: T

                Returns void

          • complete: function
              • (): void
              • Returns void

          • error: function
              • (error: Error): void
              • Parameters

                • error: Error

                Returns void

          Returns DisposeCallback | void

    Returns Observable<T>

createCombineLatestObserverFactory

  • createCombineLatestObserverFactory<T>(streams: Array<ObservableLike<T>>, observer: Observer<Array<T>>): function

distinct

distinctUntilChanged

filter

fromEmitter

fromPromise

hold

isObservable

  • isObservable(value: any): boolean

isPromise

  • isPromise(value?: any): boolean

just

map

merge

merge

noop

  • noop(): void

noop

  • noop(): void

noop

  • noop(): void

noop

  • noop(): void

notEqual

  • notEqual(value1: any, value2: any): boolean

scan

skip

switchLatest

switchMap

sync

take

tap

toObservable

toPromise