1.0.2 • Published 7 years ago

hellewhile v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Hellewhile

An awesome while loop implementation for promises.

NPM

Travis (.org) npm

Usage

Hellewhile is a UMD module, therefore is compatible with both AMD and CommonJS:

import hellewhile from 'hellewhile';
const hellewhile = require('hellewhile');

Example Usage

See tests!

hellewhile

An awesome while loop implementation for promises.

hellewhile

While loop implementation for an asynchronous function.

ParamTypeDefaultDescription
asyncFnasyncFnthe asynchronous function run with the context object.
predicatepredicatethe predicate function to be used as the while loop conditional.
contextObjectnulloptional context object to be passed into the asyncFn and predicate functions.
trackerStringnulloptional property to be set on the context object that will store the results of each individual asyncFn call.

hellewhile~predicate(results, context) ⇒ Boolean

Predicate function to be applied to the results of the asyncFunc.

Returns: Boolean - if true, ends the loop.

ParamTypeDescription
results*results returned from the asyncFn
contextObject | nullthe context object, null if not passed in.

hellewhile~asyncFn(context) ⇒ Promise.<*>

Asynchronous function to loop over.

Returns: Promise.<*> - results of the asynchronous call

ParamTypeDescription
contextObject | nullthe context object, null if not passed in.
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago