common-stuff
    Preparing search index...

    Function pipe

    • Perform left-to-right function composition.

      Type Parameters

      • A
      • B

      Parameters

      • value: A
      • op1: (input: A) => B

      Returns B

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

      • A
      • B
      • C

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C

      Returns C

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

      • A
      • B
      • C
      • D

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C
      • op3: (input: C) => D

      Returns D

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

      • A
      • B
      • C
      • D
      • E

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C
      • op3: (input: C) => D
      • op4: (input: D) => E

      Returns E

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

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

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C
      • op3: (input: C) => D
      • op4: (input: D) => E
      • op5: (input: E) => F

      Returns F

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

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

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C
      • op3: (input: C) => D
      • op4: (input: D) => E
      • op5: (input: E) => F
      • op6: (input: F) => G

      Returns G

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Type Parameters

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

      Parameters

      • value: A
      • op1: (input: A) => B
      • op2: (input: B) => C
      • op3: (input: C) => D
      • op4: (input: D) => E
      • op5: (input: E) => F
      • op6: (input: F) => G
      • op7: (input: G) => H

      Returns H

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]
    • Perform left-to-right function composition.

      Parameters

      • value: unknown
      • ...operations: ((value: unknown) => unknown)[]

      Returns unknown

      pipe(
      [1, 2, 3, 4],
      arr => arr.map(v => v * 2),
      arr => arr.map(v => v + 2)
      )
      // [4, 6, 8, 10]