Compose a series of unary functions left-to-right, applying them to a seed value. Unlike flow, pipe runs immediately and returns the result.
pipe
const slug = pipe( " Hello World ", (s) => s.trim(), (s) => s.toLowerCase(), (s) => s.replace(/\s+/g, "-"), ) // "hello-world" Copy
const slug = pipe( " Hello World ", (s) => s.trim(), (s) => s.toLowerCase(), (s) => s.replace(/\s+/g, "-"), ) // "hello-world"
Compose a series of unary functions left-to-right, applying them to a seed value. Unlike flow,
piperuns immediately and returns the result.