Skip to content

unctionjs/aside

Repository files navigation

@unction/aside

Tests Stability Dependencies

Array<MapperFunctionType<A, B>> => A => A

Takes a stack of functions, like pipe(), but always returns the second argument.

pipe(
  aside([(value) => value.toLowerCase(), console.log]),
  processData
)(
  "Hello, world"
) // "Hello, world"

But also logs:

"hello, world"