Stream
Stream class for BaconJS stream wrapping.
Static Method Summary
Static Public Methods | ||
public static |
from_dom_event(arg_dom_elem: string, arg_event_name: string): Stream Create a Stream instance with a DOM event source stream. |
|
public static |
from_emitter_event(arg_emitter: object, arg_event_name: string): Stream Create a Stream instance with an event emitter source stream. |
Constructor Summary
Public Constructor | ||
public |
constructor(): nothing Create a stream. |
Method Summary
Public Methods | ||
public |
debounce_immediate(arg_milliseconds: integer): * Debounce immediate. |
|
public |
Get counters snapshot and reset values to 0. |
|
public |
Get counters snapshot. |
|
public |
get_source_stream(): Baconjs.Bus Get input stream. |
|
public |
get_transformed_stream(): Baconjs.Bus Get output stream. |
|
public |
Subscribe to stream errors. |
|
public |
Push a value into the stream. |
|
public |
set_transformation(arg_stream_transformation: function): Stream Set output stream transformation. |
|
public |
set_transformed_stream(arg_stream: Baconjs.Bus): Stream Set output stream. |
|
public |
Subscribe to stream values. |
Static Public Methods
Public Constructors
Public Members
public counters: {} source
Private Members
private _source_stream: * source
private _transformed_stream: * source
Public Methods
public debounce_immediate(arg_milliseconds: integer): * source
Debounce immediate.
Params:
Name | Type | Attribute | Description |
arg_milliseconds | integer | number of milliseconds. |
Return:
* |
public get_and_reset_counters_snapshot(): * source
Get counters snapshot and reset values to 0.
Return:
* |
public on_error(arg_handler: Function): Function source
Subscribe to stream errors.
Params:
Name | Type | Attribute | Description |
arg_handler | Function | value handler f(value) => nothing. |
public set_transformation(arg_stream_transformation: function): Stream source
Set output stream transformation.
Params:
Name | Type | Attribute | Description |
arg_stream_transformation | function | function (source stream)=>{ return transformed stream }. |