README
Pipe
yarn add @katis/pipe
npm install @katis/pipe
TypeScript library for transforming values in the style of the Elm and F# pipe-operator.
Motivation
Transforming values by chaining multiple function calls can make the code harder to read:
const removePrefix = (str: string, prefix: string): string =>
str.startsWith(prefix) ? str.slice(prefix.length) : str;
const replace = (str: string, search: string, replaceWith: string) =>
str.replace(search, replaceWith);
parseInt(replace(removePrefix("Value: 1300