ts-pipe

Simple typescript pipe syntax

Usage no npm install needed!

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

README

ts-pipe

Node.js CI Bundle Phobia Bundle Phobia Being able to pipe data through functions or compose a piped function.

Examples

import { pipeable, lazyPipeable } from "ts-pipe";

pipeable("20")
  .pipe((x) => Number(x))
  .pipe((x) => x + 5).value; // 25

const lazyPiped = lazyPipeable((x) => Number(x)).pipe((x) => x + 5);
lazyPiped.call("14"); // 19