pipe-util

Combine your functions in a sensible way.

Usage no npm install needed!

<script type="module">
  import pipeUtil from 'https://cdn.skypack.dev/pipe-util';
</script>

README

pipe-util

Combine your functions in a sensible way.

import pipe from "pipe"

const add = (a) => (b) => a + b
const square = (a) => a * a

pipe(add(2), square)(3) // 25

You can also combine multiple pipes.

const add2AndSquare = pipe(add(2), square)

pipe(add2AndSquare, add(3))(2) // 19