Pipes multiple functions from left to right.
The type of input and output for all functions.
Rest
The functions to apply sequentially.
const trim = (s: string): string => s.trim();const toUpperCase = (s: string): string => s.toUpperCase();const exclaim = (s: string): string => `${s}!`;const pipedFn = pipe(trim, toUpperCase, exclaim);console.log(pipedFn(" hello ")); // "HELLO!" Copy
const trim = (s: string): string => s.trim();const toUpperCase = (s: string): string => s.toUpperCase();const exclaim = (s: string): string => `${s}!`;const pipedFn = pipe(trim, toUpperCase, exclaim);console.log(pipedFn(" hello ")); // "HELLO!"
Pipes multiple functions from left to right.