plainfp - v0.1.0
    Preparing search index...

    Function pipe

    • Compose a series of unary functions left-to-right, applying them to a seed value. Unlike flow, pipe runs immediately and returns the result.

      Type Parameters

      • A

      Parameters

      Returns A

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B

      Parameters

      • a: A
      • ab: (a: A) => B

      Returns B

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C

      Returns C

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C
      • D

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C
      • cd: (c: C) => D

      Returns D

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C
      • D
      • E

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C
      • cd: (c: C) => D
      • de: (d: D) => E

      Returns E

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C
      • D
      • E
      • F

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C
      • cd: (c: C) => D
      • de: (d: D) => E
      • ef: (e: E) => F

      Returns F

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C
      • D
      • E
      • F
      • G

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C
      • cd: (c: C) => D
      • de: (d: D) => E
      • ef: (e: E) => F
      • fg: (f: F) => G

      Returns G

      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, pipe runs immediately and returns the result.

      Type Parameters

      • A
      • B
      • C
      • D
      • E
      • F
      • G
      • H

      Parameters

      • a: A
      • ab: (a: A) => B
      • bc: (b: B) => C
      • cd: (c: C) => D
      • de: (d: D) => E
      • ef: (e: E) => F
      • fg: (f: F) => G
      • gh: (g: G) => H

      Returns H

      const slug = pipe(
      " Hello World ",
      (s) => s.trim(),
      (s) => s.toLowerCase(),
      (s) => s.replace(/\s+/g, "-"),
      )
      // "hello-world"