number-stream.md

March 29, 2021 · View on GitHub

Scramjet Logo

: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

new NumberStream(options)

Creates an instance of NumberStream.

ParamType
optionsNumberStreamOptions

numberStream.sum() : Promise. | any ⇄

Calculates the sum of all items in the stream.

Kind: instance method of NumberStream

numberStream.avg() : Promise. | any ⇄

Calculates the sum of all items in the stream.

Kind: instance method of NumberStream