Chain

Chain

A chain of functions

Constructor

new Chain()

Source:

Creates a chain

Methods

do(func) → {Chain.<T>}

Source:

Queues a NativeFunction to be ran.

Parameters:
Name Type Description
func NativeFunction.<T>

The function

Returns:
  • The Chain
Type
Chain.<T>

run(asyncopt) → {Promise.<T>|T}

Source:

Runs the chain of functions

Parameters:
Name Type Attributes Default Description
async bool <optional>
true

Whether or not to run asynchronously in a thread

Returns:
  • The unwrap>ed return value of the last function in the chain
Type
Promise.<T> | T