Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/pipe.ts>Pipeline

A JavaScript extension package for building strong and modern applications.
Latest
class Pipeline
import { Pipeline } from "https://deno.land/x/ayonli_jsext@v0.9.72/pipe.ts";

Pipeline holds a value and allows you chain operations upon it (and the result of the previous operation) to get the final result, similar to the Unix pipe operator | in shell scripting.

Constructors

new
Pipeline(value: T)

Properties

private
[_value]: T
readonly
value: T
readonly
[Symbol.toStringTag]: "Pipeline"

Methods

pipe<R, A extends any[] = any[]>(fn: (value: T, ...args: A) => R, ...args: A): Pipeline<R>

Calls a function using the current value as its argument and returns a new Pipeline instance that holds the result.