Futura Api Documentation

Version: 0.3.0

futura.stream

IPublisher

protocol

members

publisher*

(publisher* source)

Create a publisher.

publisher

(publisher source)

A polymorphic publisher constructor.

put!

(put! p v)

Puts a value into a stream, returning a promise that yields true if it succeeds, and false if it fails.

subscribe

(subscribe p)

Create a subscription to the given publisher instance.

The returned subscription does not consumes the publisher data until is requested.

take!

(take! p)

Takes a value from a stream, returning a deferred that yields the value when it is available or nil if the take fails.

transform

(transform xform publisher)

A polymorphic publisher transformer.