Skip to content

xdash API Reference v0.5.14


xdash API Reference / chain

Function: chain()

chain<T>(value): Chain<T, T>

Defined in: src/chain.ts:82

Chains a value to be used in a pipeline.

Type Parameters

T

T

Parameters

value

T

value to chain

Returns

Chain<T, T>

a chain of the value

Example

ts
chain(5).pipe(add, 5).pipe(multiply, 2).unwrap() // returns 20

Released under the MIT License.