Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / helpers / pipeAsync

Function: pipeAsync()

pipeAsync<T, R>(value, fn): Promise<R>

Defined in: helpers/index.ts:186

Async version of pipe.

Type Parameters

T

T

R

R

Parameters

value

T

fn

(val) => Promise<R>

Returns

Promise<R>

Example

const hashed = await pipeAsync(password, (p) => bcrypt.hash(p, 12));