Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Pipeline<TIn, TOut>

A class for writing chained/conditional operations in a data-flow manner.

This is useful when you need to do a series of operations on an object, perhaps conditionally.

Type parameters

  • TIn

  • TOut

Hierarchy

  • Pipeline

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Pipeline<TIn, TOut>(factory: (TIn: TIn) => TOut): Pipeline<TIn, TOut>
  • Type parameters

    • TIn

    • TOut

    Parameters

    • factory: (TIn: TIn) => TOut
        • (TIn: TIn): TOut
        • Parameters

          • TIn: TIn

          Returns TOut

    Returns Pipeline<TIn, TOut>

Properties

Protected Readonly factory

factory: (TIn: TIn) => TOut

Type declaration

    • (TIn: TIn): TOut
    • Parameters

      • TIn: TIn

      Returns TOut

Methods

apply

  • apply(input: TIn): TOut

Protected checkCondition

first

peek

tap

  • Apply the given operator to the item in the pipe, and return a new pipe with the result.

    example
    Pipe.wrap(2)
     .tap(x => x * 4)
     .get()  // => 8
    

    Type parameters

    • T2

    Parameters

    Returns Pipeline<TIn, T2>

unless

when

Static id

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.