Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

ASyncIterator

Oliver Foster edited this page Jul 13, 2017 · 11 revisions

This class is the foundation of the Stats and Watches classes, it is also used in the Globs class. It is an extension of Array to allow for the asynchronous forward and backward iteration

ASyncIterator[] {

  each(callback, options),
  reverseEach(callback, options)

}

Options

ASyncIterator[] {

  each(callback),

  reverseEach(callback)

}

Example

ASyncIterator[] {

  each(function (item, next, resolve, reject) {
    
     next({
         remove: false // set to true to remove item from list
     });

  }),

  reverseEach(function (item, next, resolve, reject) {
    
     next({
         remove: false // set to true to remove item from list
     });

  })


}
Clone this wiki locally