cb icon indicating copy to clipboard operation
cb copied to clipboard

A minimal node.js utility for handling common (but often overlooked) callback scenarios.

Results 9 cb issues
Sort by recently updated
recently updated
newest added

Adds the ability to use a custom timeout handler, currently we expose TimeoutError but no way to inherit from it and apply it to callbacks as a handler.

Async should be a feature that is disabled by default, its use cases are for modules that do not follow best practises when creating events or callbacks, which should be...

This will generate a unique id for each callback, useful for when transmitting over network, and also will be vital for the next pull request which will deal with freeing...

This will allow for users to have a rolling timeouts for callbacks that should be called regularly. How `cb.interval(1000)` sets a timeout and has it reset on each iteration `cb.interval(false)`...

Free the callback automatically on timeout, or via the `cb.free()` method from emitters. emitters are added using `cb.emitter(ee);`

Allow for the context of the callback to be changed, also allows currying of arguments. Should close this ticket/PR https://github.com/jmar777/cb/pull/1

Allows for you to retrieve the callback original passed before and after timeout. This makes the callback callable even after timeout.

This PR will allow for a cb timeout to be cleared and not just extended/reduced