Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 2.25 KB

api.md

File metadata and controls

68 lines (44 loc) · 2.25 KB

Table of Contents

Reissue.start

Starts the timer interval. Calling start() while reissue is already active will throw an exception.

Parameters

  • delay Number? an optional delay in ms before first invocation. if no delay is provided, first invocation is synchronous (no setImmediate, no setTimeout). Note that 0 is explicitly a valid value, and will be passed to setTimeout.

Returns undefined

Reissue.stop

Stops the interval execution, and clears any queued up invocations.

Returns undefined

create

This module exposes a create method which takes the following options:

Parameters

  • opts Object an options object
    • opts.func Object the function to execute on an interval. this function is invoked with a callback function as its last parameter.
    • opts.interval Number the interval in ms to execute the function, or a function that returns an interval, allowing usage of a dynamic interval.
    • opts.timeout Number? an optional timeout in ms. if any invocation of the the supplied func exceeds this timeout, the timeout event is fired.
    • opts.context Object? an optional this context for the function invocation. use this in lieu of native bind() if you are concerned about performance. reissue uses apply() under the hood to do context/arg binding.
    • opts.args Array? an optional array of arguments for the function. used in conjunction with the same apply() call as the context.

Returns Reissue a Reissue object