ixfx
    Preparing search index...

    Module @ixfx/rx - v0.44.1

    Namespaces

    Collections
    From

    Functions

    annotate

    Annotates values from source. Output values will be in the form { value: TIn, annotation: TAnnotation }. Where TIn is the type of the input, and TAnnotation is the return type of the annotator function.

    annotateWithOp

    Annotates the input stream using ReactiveOp as the source of annotations. The output values will have the shape of { value: TIn, annotation: TAnnotation }. Meaning that the original value is stored under .value, and the annotation under .annotation.

    average
    cache

    Wrapes an input stream to cache values, optionally providing an initial value

    chunk

    Queue from source, emitting when thresholds are reached. The resulting Reactive produces arrays.

    cloneFromFields

    Create a new object from input, based on cloning fields rather than a destructured copy. This is useful for event args.

    combineLatestToArray

    Monitors input reactive values, storing values as they happen to an array. Whenever a new value is emitted, the whole array is sent out, containing current values from each source, or undefined if not yet emitted.

    combineLatestToObject

    Monitors input reactive values, storing values as they happen to an object. Whenever a new value is emitted, the whole object is sent out, containing current values from each source (or undefined if not yet emitted)

    computeWithPrevious

    When there is a value from input, or the reactive is pinged, this reactive emits the result of fn.

    debounce
    drop

    Drops all values where predicate function returns true.

    elapsed

    Emits time in milliseconds since last message. If it is the first value, 0 is used.

    field

    From a source value, yields a field from it. Only works if stream values are objects.

    filter

    Passes all values where predicate function returns true.

    hasLast
    initLazyStream

    Initialises a lazy stream Consider also: initLazyStreamWithInitial

    initLazyStreamWithInitial

    Initialises a lazy stream with an initial value. Uses initLazyStream and cache together.

    interpolate

    Interpolates to the source value.

    isPingable
    isReactive

    Returns true if rx is a Reactive

    isTrigger
    isTriggerFunction
    isTriggerGenerator
    isTriggerValue
    isWrapped
    isWritable

    Returns true if rx is a writable Reactive

    manual

    Initialises a reactive that pipes values to listeners directly.

    max
    messageHasValue

    Returns true if v has a non-undefined value. Note that sometimes undefined is a legal value to pass

    messageIsDoneSignal
    messageIsSignal
    min
    opify
    pipe

    Pipes the output of one stream into another, in order. The stream returned is a new stream which captures the final output.

    prepare

    Build a graph of reactive dependencies for rx

    rank
    resolveSource

    Resolves various kinds of sources into a Reactive. If source is an iterable/generator, it gets wrapped via generator().

    resolveTriggerValue

    Resolves a trigger value.

    run
    setHtmlText

    Values from input are set to the textContent/innerHTML of an element.

    singleFromArray

    For a stream that emits arrays of values, this op will select a single value.

    split

    Creates a set of streams each of which receives data from source. By default these are lazy and dispose if the upstream source closes.

    splitLabelled

    Splits source into several duplicated streams. Returns an object with keys according to labels. Each value is a stream which echos the values from source.

    sum
    switcher

    Switcher generates several output streams, labelled according to the values of cases. Values from source are fed to the output streams if their associated predicate function returns true.

    syncToArray

    Waits for all sources to produce a value, sending the combined results as an array. After sending, it waits again for each source to send at least one value.

    syncToObject
    takeNextValue

    Grabs the next value emitted from source. By default waits up to a maximum of one second. Handles subscribing and unsubscribing.

    tally
    tapOps

    Create a parallel 'tap' of processing

    tapProcess

    'Taps' the values from 'input', passing them to the 'process' function. Return stream is the input stream, unaffected by what 'process' does.

    tapStream

    'Taps' the values from 'input', passing them to 'diverged' Returns the original input stream, unaffected by what 'diverged' does.

    throttle

    Only allow a value through if a minimum amount of time has elapsed. since the last value. This effectively slows down a source to a given number of values/ms. Values emitted by the source which are too fast are discarded.

    timeoutPing

    Pings a reactive if no value is emitted at after interval. Returns source.

    timeoutValue

    Emits a value if source does not emit a value after interval has elapsed. This can be useful to reset a reactive to some 'zero' state if nothing is going on.

    to

    Connects reactive A to B, optionally transforming the value as it does so.

    toArray

    Reads a set number of values from source, returning as an array. May contain empty values if desired values is not reached.

    toArrayOrThrow

    By default, reads all the values from source, or until 5 seconds has elapsed.

    toGenerator

    Returns an AsyncGenerator wrapper around Reactive. This allows values to be iterated over using a for await loop, like Chains.

    transform

    Transforms values from source using the transformer function.

    valueToPing

    Pings target whenever source emits a value. The value itself is ignored, it just acts as a trigger.

    withValue

    A reactive where the last value can be read at any time. An initial value must be provided.

    wrap

    Wrap a reactive source to allow for chained function calls.

    writable

    Type Aliases

    CacheStream

    A stream that caches its last value

    CacheStreamInitial

    A CacheStream with an initial value

    ChunkOptions
    CombineLatestOptions
    CombineLatestToObject
    DebounceOptions
    FieldOptions
    FilterPredicate
    InitLazyStreamInitedOptions
    InitLazyStreamOptions
    InitStreamOptions
    Lazy

    Laziness

    • start: only begins on first subscriber. Keeps running even when there are no subscribers
    • very: only begins on first subscriber. Stops looping if there are no subscribers
    • never: begins calling function when initalised and doesn't stop until Reactive is disposed
    ObjectFieldHandler
    OpAsAnnotation
    OpInterpolateOptions
    OpMathOptions
    Optional
    Passed
    PassedSignal
    PassedValue
    PipeSet
    PrimitiveValueTypeObject
    Reactive

    A Reactive

    ReactiveArray
    ReactiveDiff
    ReactiveFinite
    ReactiveInitial
    ReactiveInitialStream
    ReactiveNonInitial
    ReactiveOp
    ReactiveOpInit
    ReactiveOrSource
    ReactivePingable

    A reactive that can be 'pinged' to produce a value.

    ReactiveStream

    A reactive stream which can be read and written to

    ReactiveWritable

    A stream that can be written to

    ResolveOptions
    ResolveSourceOptions
    ResolveTriggerDone
    ResolveTriggerValue
    RxValueTypeObject
    RxValueTypeObjectOrUndefined
    RxValueTypeRx
    RxValueTypes
    SetHtmlOptions
    SetHtmlOptionsElement
    SetHtmlOptionsQuery
    SignalKinds
    SingleFromArrayOptions
    SplitOptions
    SwitcherOptions

    Switcher options.

    SyncOptions
    TallyOptions
    ThrottleOptions
    ToArrayOptions
    TransformOpts

    Transform options

    Unsubscriber
    UpstreamInitialOptions
    UpstreamOptions
    WithValueOptions

    WithValue stream options

    Wrapped

    Wrapped Reactive for object-oriented access

    Variables

    Ops
    Sinks
    symbol