beicon.v2

behavior-subject

(behavior-subject v)

Bus that emits the most recent item it has observed and all subsequent observed items to each subscribed Observer.

BehaviorSubject

buffer

(buffer n ob)(buffer n o ob)

Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.

buffer-time

(buffer-time ms ob)(buffer-time ms start ob)(buffer-time ms start max ob)

Buffers the source Observable values for a specific time period.

buffer-until

(buffer-until notifier ob)

Buffers the source Observable values until notifier emits.

catch

(catch handler ob)(catch pred handler ob)

Continues an observable sequence that is terminated by an exception with the next observable sequence.

combine-latest

Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables (constructor).

combine-latest-all

(combine-latest-all obs)

Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables (constructor).

A variant of conbine-latest* that accepts an array or sequential

combine-latest-with

(combine-latest-with o1 ob)(combine-latest-with o1 o2 ob)(combine-latest-with o1 o2 o3 ob)(combine-latest-with o1 o2 o3 o4 ob)(combine-latest-with o1 o2 o3 o4 o5 ob)(combine-latest-with o1 o2 o3 o4 o5 o6 ob)

Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables (operator).

comp

comp

macro

(comp & items)

concat

Concatenates all of the specified observable sequences, as long as the previous observable sequence terminated successfully.

concat-all

(concat-all ob)

concat-reduce

(concat-reduce f seed ob)

Like reduce but accepts a function that returns a stream. Will use as value for the next step in the reduce the last valued emited by the stream in the function.

connect!

(connect! ob)

Connect the connectable observable.

create

(create sf)

Creates an observable sequence from a specified subscribe method implementation.

debounce

(debounce ms ob)

Emits an item from the source Observable after a particular timespan has passed without the Observable omitting any other items.

delay

(delay ms ob)

Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved.

delay-at-least

(delay-at-least ms ob)

Time shifts at least ms milisseconds.

delay-when

(delay-when sf ob)(delay-when sf sd ob)

Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.

Disposable

disposable?

(disposable? v)

Check if the provided object is disposable (jvm) or subscription (js).

dispose!

(dispose! v)

Dispose resources acquired by the subscription.

empty

(empty)

Returns an observable sequence that is already in end state.

end!

(end! b)

Ends the given bus stream.

end!

macro

(end! ob)

error

(error e)

Same as throw

error!

(error! b e)

Pushes the given error to the bus stream.

error!

macro

(error! ob val)

expand

(expand f ob)

Recursively projects each source value to an Observable which is merged in the output Observable.

filter

(filter f ob)

Filters the elements of an observable sequence based on a predicate.

finalize

(finalize f ob)

Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error.

first

(first ob)

Return an observable that only has the first value of the provided observable. You can optionally pass a predicate and default value.

fjoin

Runs all observable sequences in parallel and collect their last elements.

flatten

(flatten ob)

Just like clojure collections flatten but for rx streams. Given a stream off collections will emit every value separately

from

(from v)

Creates an observable from js arrays, clojurescript collections, and promise instance.

from-atom

(from-atom atm)(from-atom atm {:keys [emit-current-value?], :or {emit-current-value? false}})

from-event

(from-event et ev)

Creates an Observable by attaching an event listener to an event target

if-empty

(if-empty default ob)

Emits a given value if the source Observable completes without emitting any next value, otherwise mirrors the source Observable.

ignore

(ignore ob)

Ignores all elements in an observable sequence leaving only the termination messages.

interval

(interval ms)

Returns an observable sequence that produces a value after each period.

last

(last ob)

Return an observable that only has the last value of the provided observable. You can optionally pass a predicate and default value.

map

(map f ob)

Apply a function to each element of an observable sequence.

map-indexed

(map-indexed f ob)

Same as map but also projects an index.

mapcat

(mapcat f ob)

Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences or Promises or array/iterable into one observable sequence.

merge

Merges all the observable sequences and Promises into a single observable sequence.

merge-all

(merge-all ob)(merge-all concurrency ob)

Merges an observable sequence of observable sequences into an observable sequence.

merge-map

(merge-map f ob)

Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences or Promises or array/iterable into one observable sequence.

In other languages is called: flatMap or mergeMap.

merge-scan

(merge-scan f seed ob)

Applies an accumulator function over the source Observable where the accumulator function itself returns an Observable, then each intermediate Observable returned is merged into the output Observable.

noop

Observable

observable?

(observable? ob)

Return true if ob is a instance of Rx.Observable.

observe-on

(observe-on sch ob)

of

Converts arguments to an observable sequence

pipe

publish!

(publish! ob)

Create a connectable (hot) observable from other observable.

push!

(push! b v)

Pushes the given value to the bus stream.

push!

macro

(push! ob val)

race

Create an observable that surfaces any of the given sequences, whichever reacted first.

range

(range b)(range a b)

Generates an observable sequence that repeats the given element.

reduce

(reduce f seed ob)

Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence.

retry

(retry ob)(retry n ob)

Given an optional number of retries and an observable, repeats the source observable the specified number of times or until it terminates. If no number of retries is given, it will be retried indefinitely.

sample

(sample ms ob)

Samples the observable sequence at each interval.

sample-when

(sample-when other ob)

Samples the observable sequence at each interval.

scan

(scan f seed ob)

Applies an accumulator function over an observable sequence and returns each intermediate result. Same as reduce but with intermediate results

scheduler

(scheduler type)

Get the scheduler instance by type. The posible types are: :asap, :async, :queue. Old :trampoline type is renamed as :queue and is deprecated.

Scheduler

scheduler?

(scheduler? v)

Check if the provided value is Scheduler instance.

share

(share ob)

Returns an observable sequence that shares a single subscription to the underlying sequence.

skip

(skip n ob)

Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.

skip-last

(skip-last n ob)

Skip a specified number of values before the completion of an observable.

skip-until

(skip-until pob ob)

Returns the values from the source observable sequence only after the other observable sequence produces a value.

skip-while

(skip-while f ob)

Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.

sub!

(sub! ob nf)(sub! ob next-fn error-fn)(sub! ob next-fn error-fn complete-fn)

Subscribes an observer to the observable sequence.

subject

(subject)

Subject that, once an Observer has subscribed, emits all subsequently observed items to the subscriber.

Subject

subject?

(subject? b)

Check if the provided value is Subject instance.

subs!

(subs! nf ob)(subs! nf ef ob)(subs! nf ef cf ob)

A specialized version of subscribe with inverted arguments.

subscribe

(subscribe ob nf)(subscribe ob next-fn error-fn)(subscribe ob next-fn error-fn complete-fn)

Subscribes an observer to the observable sequence.

subscribe-on

(subscribe-on sch ob)

Subscriber

subscriber?

(subscriber? o)

switch-map

(switch-map f ob)

take

(take n ob)

Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.

take-last

(take-last n ob)

take-until

(take-until other ob)

Returns the values from the source observable sequence until the other observable sequence or Promise produces a value.

take-while

(take-while f ob)

Returns elements from an observable sequence as long as a specified predicate returns true.

tap

(tap f ob)(tap f e ob)(tap f e c ob)

Invokes an action for each element in the observable sequence.

throttle

(throttle ms ob)(throttle ms config ob)

Returns an observable sequence that emits only the first item emitted by the source Observable during sequential time windows of a specified duration.

throw

(throw e)

Returns an exceptionally terminated observable with provided cause.

timeout

(timeout ms ob)(timeout ms with ob)

Returns the source observable sequence or the other observable sequence if dueTime elapses.

timer

Returns an observable sequence that produces a value after ms has elapsed and then after each period.

to-atom

(to-atom ob)(to-atom ob a)(to-atom ob a f)

Materialize the observable sequence into an atom.

to-observable

(to-observable ob)

Coerce a object to an observable instance.

transform

(transform xform ob)

Transform the observable sequence using transducers.

with-latest-from

(with-latest-from o1 source)(with-latest-from o1 o2 source)(with-latest-from o1 o2 o3 source)(with-latest-from o1 o2 o3 o4 source)(with-latest-from o1 o2 o3 o4 o5 source)(with-latest-from o1 o2 o3 o4 o5 o6 source)

Merges the specified observable sequences into one observable sequence by using the selector function only when the source observable sequence (the instance) produces an element.

zip

Merges the specified observable sequences or Promises (cljs) into one observable sequence.