JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 677965
  • Score
    100M100P100Q174320F
  • License ISC

Run a list of functions in order in a given object context. The functions can be callback-taking or promise-returning.

Package Exports

  • function-loop

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (function-loop) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

function-loop

Run a list of functions in order in a given object context. The functions can be callback-taking or promise-returning.

This module is zalgo-exposing, meaning that synchronous calls to the cb functions will result in a sync call to the supplied cb, and async calls will result in the cb being called asynchronously. It does not artificially defer if callbacks are called synchronously.

API

loop(context, functionList, doneCallback, errorCallback)

Run all the functions in the context of the context object, and then call the doneCallback or call the errorCallback if there are any errors.