new RegisterCallback()
Creates an instance of RegisterCallback.
Methods
-
next( [err], args)
-
When next() is invoked, it calls all functions in this.callbacks list and passes error and args to each function.
Parameters:
Name Type Argument Default Description err
Error <optional>
null args
* <repeatable>
-
register(cb)
-
When register() is invoked, it adds next and error functions to the callbacks list.
Parameters:
Name Type Description cb
function The callback function is invoked when registerCallbackInstance.next is called. Returns:
- Type
- function