• Apply a series of operators to a value, returning the original value.

    Helpful for values/methods that don't support chaining.

    Example

    const inOneHour = () => tap(new Date, d => d.setMinutes(d.getMinutes() + 60))
    

    This is equivalent to:

    const inOneHour = () => {
    const d = new Date
    d.setMinutes(d.getMinutes() + 60)
    return d
    }

    Type Parameters

    • T

    Parameters

    • value: T
    • Rest ...ops: ((t: T) => unknown)[]

    Returns T