The JavaScript Database, for Node.js, nw.js, electron and the browser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
nedb/docs/Waterfall.md

1.8 KiB

Waterfall

Kind: global class

new Waterfall()

Instantiate a new Waterfall.

waterfall._guardian : Promise

This is the internal Promise object which resolves when all the tasks of the Waterfall are done.

It will change any time this.waterfall is called.

Use [guardian](#Waterfall+guardian) instead which retrievethe latest version of the guardian.

Kind: instance property of Waterfall
Access: protected

waterfall.guardian ⇒ Promise

Getter that gives a Promise which resolves when all tasks up to when this function is called are done.

This Promise cannot reject.

Kind: instance property of Waterfall

waterfall.waterfall(func) ⇒ AsyncFunction

Kind: instance method of Waterfall

Param Type
func AsyncFunction

waterfall.chain(promise) ⇒ Promise

Shorthand for chaining a promise to the Waterfall

Kind: instance method of Waterfall

Param Type
promise Promise