Documentation / zerotal / helpers / pipeAsync
Function: pipeAsync()
pipeAsync<
T,R>(value,fn):Promise<R>
Defined in: packages/core/src/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));