@mathjax/src
    Preparing search index...

    Class FunctionList<F>

    Implements the FunctionList class (extends PrioritizedList)

    Type Parameters

    • F extends AnyFunction = AnyFunction

    Hierarchy (View Summary)

    Index
    items: PrioritizedListItem<F>[] = []

    The list of items, sorted by priority (smallest number first)

    DEFAULTPRIORITY: number = 5

    The default priority for items added to the list

    • Add an item to the list

      Parameters

      • item: F

        The data for the item to be added

      • priority: number = PrioritizedList.DEFAULTPRIORITY

        The priority for the item

      Returns F

      The data itself

    • Add a list of filter functions, possibly with priorities.

      Parameters

      • list: AnyFunctionList<F>

        The list of functions to add

      Returns void

    • Executes the functions in the list (in prioritized order) asynchronously, passing the given data to the functions, and doing the next function only when the previous one completes. If the function returns a Promise, then use that to control the flow. Otherwise, if the function returns false, the list is terminated. This function returns a Promise. If any function in the list fails, the promise fails. If any function returns false, the promise succeeds, but passes false as its argument. Otherwise it succeeds and passes true.

      Parameters

      • ...data: any[]

        The array of arguments to pass to the functions

      Returns Promise<boolean>

      The promise that is satisfied when the function list completes (with argument true or false depending on whether some function returned false or not).

    • Executes the functions in the list (in prioritized order), passing the given data to the functions. If any return false, the list is terminated.

      Parameters

      • ...data: any[]

        The array of arguments to pass to the functions

      Returns boolean

      False if any function stopped the list by returning false, true otherwise