Given a transformer return a concatenating transformer
Given a transformer return a concatenating transformer
a concatenating transformer
Function composition.
Function composition. Take N function and return their composition.
N functions
(Function): composition.
Take a predicate function and return its complement.
Take a predicate function and return its complement.
(Function): predicate function
(Function): the complement predicate function
A completing transducer constructor.
A completing transducer constructor. Useful to provide cleanup logic at the end of a reduction/transduction.
(ITransformer): a transducer
(Function): a function to apply at the end of the reduction/transduction
(ITransformer): a transducer
A dropping transducer constructor
A dropping transducer constructor
an integer, the number of inputs to drop.
a dropping transducer
A dropping transducer that drop inputs as long as pred is true.
A dropping transducer that drop inputs as long as pred is true.
a predicate function
a dropWhile transducer
Ensure that a value is reduced.
Ensure that a value is reduced. If already reduced will not re-wrap.
any JavaScript value
a reduced value.
Filtering transducer constructor
Filtering transducer constructor
a predicate function
a filtering transducer
A transformer which simply returns the first input.
A transformer which simply returns the first input.
a transducer transformer
Identity function.
Identity function.
vany JavaScript value
a JavaScript value
Reduce a value into the given empty value using a transducer.
Reduce a value into the given empty value using a transducer.
(String | Array | Object): a JavaScript collection
a transducer
(Object): any iterable JavaScript value: array, string, object, or iterable.
a JavaScript value.
Check if a value is reduced.
Check if a value is reduced.
(Object): any JavaScript value
true if the value is an instance of transducers.Reduced false otherwise
A keeping transducer.
A keeping transducer. Keep inputs as long as the provided function does not return null or undefined.
a function
a keep transducer
Like keep but the provided function will be passed the index as the second argument.
Like keep but the provided function will be passed the index as the second argument.
a function
a keep-indexed transducer
Mapping transducer constructor
Mapping transducer constructor
a function
a mapping transducer
A mapping concatenating transformer
A mapping concatenating transformer
a function
a mapping concatenating transducer
A partitioning transducer.
A partitioning transducer. Collects inputs into arrays of size N.
an integer
a partitionAll transducer
A partitioning transducer.
A partitioning transducer. Collects inputs into arrays as long as predicate remains true for contiguous inputs.
a partition function. When the result for an input changes from the previous result will create a partition.
a partitionBy transducer
Given a transformer returns a transformer which preserves reduced by wrapping one more time.
Given a transformer returns a transformer which preserves reduced by wrapping one more time. See cat.
a transformer
a transformer which preserves reduced
Given a transducer, an intial value and a collection - returns the reduction.
Given a transducer, an intial value and a collection - returns the reduction.
(ITransformer | Function): a transducer or two-arity function
(Object): any JavaScript value
(String | Array | Object): any iterable JavaScript value
(Object): an iterable JavaScript value: string, array iterable, or object.
Return a reduced value.
Return a reduced value. Reduced values short circuit transduce.
(Object): any JavaScript value
(IReduced): a reduced value
Similar to filter except the predicate is used to eliminate values.
Similar to filter except the predicate is used to eliminate values.
(Function): a predicate function
(Filter): a removing transducer
A take transducer constructor.
A take transducer constructor. Will take n values before returning a reduced result.
the number of inputs to receive.
a take transducer
A transducer that takes every Nth input
A transducer that takes every Nth input
an integer
a takeNth transducer
Like the take transducer except takes as long as the pred return true for inputs.
Like the take transducer except takes as long as the pred return true for inputs.
(Function): a predicate function
a takeWhile transducer
Convert a transducer transformer object into a function so that it can be used with existing reduce implementation i.e.
Convert a transducer transformer object into a function so that it can be used with existing reduce implementation i.e. native, Underscore, lodash
a function which take the accumulator and the the next input and return a new accumulator value.
a two-arity function compatible with existing reduce implementations
Given a transducer, a builder function, an initial value and a iterable collection - returns the reduction.
Given a transducer, a builder function, an initial value and a iterable collection - returns the reduction. collection - returns the reduction.
a transducer
(ITransformer | Function): a transducer or two-arity function
any JavaScript value
(String | Array | Object): any iterable JavaScript value
a JavaScript value.
Ensure a value is not reduced.
Ensure a value is not reduced. Unwraps if reduced.
any JavaScript value
a JavaScript value
Take a two-arity reducing function where the first argument is the accumluation and the second argument is the next input and convert it into a transducer transformer object.
Take a two-arity reducing function where the first argument is the accumluation and the second argument is the next input and convert it into a transducer transformer object.
a two-arity reducing function
a transducer transformer object
Transducers entry-point for browser-based applications