1.0.0 • Published 6 years ago
@axel669/composable v1.0.0
Composable
Simple library with a pipe and compose function. Includes async versions.
API
compose
compose(...functions) ->
(value) -> anyReturns a single function that calls the given functions successively (starting with the last function in the list and working backwards) using the return value of the previous being passed as the argument for the next call.
compose.async
compose.async(...functions) ->
(value) -> anyAsync version of compose. awaits the previous call before using it as the
argument for the next.
pipe
pipe(...functions) ->
(value) -> anyReturns a single function that calls the given functions successively (starting with the first function in the list and working forwards) using the return value of the previous being passed as the argument for the next call.
pipe.async
pipe.async(...functions) ->
(value) -> anyAsync version of pipe. awaits the previous call before using it as the
argument for the next.
1.0.0
6 years ago