Write additional selector transformers
jimbol opened this issue · 0 comments
jimbol commented
.select(...inputSelectors, resultFunc): *
- Operates on anything
- Accepts 0 to n
inputSelectors
- Requires a
resultFunc
as the last argumentresultFunc
receives selector outputs as arguments, in orderresultFunc
receives previous output as the last argument
- returns any value
.map(...inputSelectors, resultFunc): *
- Operates on an array
- Accepts 0 to n
inputSelectors
- Requires a
resultFunc
as the last argumentresultFunc
receives selector outputs as arguments, in orderresultFunc
gets called for each item in the previous outputresultFunc
is expected to returntrue
orfalse
- returns any value
.reduce(...inputSelectors, resultFunc, accumulator): *
- Operates on an array
- Accepts 0 to n
inputSelectors
- Requires a
resultFunc
as the second to last argumentresultFunc
receives selector outputs as arguments, in orderresultFunc
gets called for each item in the previous outputresultFunc
is expected to returntrue
orfalse
- returns any value