returns the stream collected into an array (90% use-case abbreviation
Collect the elements with a collector given There are a number of collectors provided
Iterate over all elements in the stream and do some processing via fn
takes a single element and if it returns false then further processing is stopped
Optional
pos: numberfiltering, takes an element in and is processed by fn. If it returns false then further processing on this element is skipped if it returns true it is passed down the chain.
Optional
fn: ((data: T) => boolean)Takes an element in and returns a set of something the set then is flatted into a single stream to be further processed
returns the next element in the stream difference to next is, that the internal data position is not changed, so next still will deliver the next item from the current data position. Look ahead is mostly needed internally by possible endless data constructs which have no fixed data boundary, or index positions. (aka infinite sets, or flatmapped constructs)
Perform the operation fn on a single element in the stream at a time then pass the stream over for further processing This is basically an intermediate point in the stream with further processing happening later, do not use this method to gather data or iterate over all date for processing (for the second case each has to be used)
the processing function, if it returns false, further processing is stopped
Optional
pos: numberfunctional reduce... takes two elements in the stream and reduces to one from left to right
the reduction function for instance (val1,val2) => val1l+val2
an optional starting value, if provided the the processing starts with this element and further goes down into the stream, if not, then the first two elements are taken as reduction starting point
Static
ofStatic
ofStatic
ofGenerated using TypeDoc
A simple typescript based reimplementation of streams
This is the early eval version for a lazy eval version check, LazyStream, which is api compatible to this implementation, however with the benefit of being able to provide infinite data sources and generic data providers, the downside is, it might be a tad slower in some situations