@drblaster/pipe

Pipe unary functions easily

Usage no npm install needed!

<script type="module">
  import drblasterPipe from 'https://cdn.skypack.dev/@drblaster/pipe';
</script>

README

pipe

Easily pipe unary functions in JavaScript.

Example:

const { pipe } = require('@drblaster/pipe');

const sumThree = arg => 3 + arg;
const sumFour = arg => 4 + arg;
const divideByTwo = arg => arg / 2;

const result = pipe(
    sumThree,
    sumFour,
    divideByTwo
)(127); // result will be 67