NumberStream
:NumberStream : DataStream
Simple scramjet stream that by default contains numbers or other containing with valueOf
method. The streams
provides simple methods like sum
, average
. It derives from DataStream so it's still fully supporting all map
,
reduce
etc.
Kind: static class
Extends: DataStream
- :NumberStream
DataStream
- new NumberStream(options)
- numberStream.sum() ⇄
Promise.<number>
|any
- numberStream.avg() ⇄
Promise.<number>
|any
new NumberStream(options)
Creates an instance of NumberStream.
Param | Type |
---|---|
options | NumberStreamOptions |
numberStream.sum() : Promise.<number> | any ⇄
Calculates the sum of all items in the stream.
Kind: instance method of NumberStream
numberStream.avg() : Promise.<number> | any ⇄
Calculates the sum of all items in the stream.
Kind: instance method of NumberStream