@flowio/blaze-callbacks
v0.0.7
Published
A multi-purpose callbacks list object that provides a way to manage callbacks.
Downloads
26
Keywords
Readme
@flowio/blaze-callbacks
A multi-purpose callbacks list object that provides a way to manage callbacks.
import Callbacks from '@flowio/blaze-callbacks';
type AnyCallback = (...args: any[]) => any;
const callbacks = new Callbacks<AnyCallback>();
const id = callbacks.add(() => {});
callbacks.invoke(id, 1, 2, 3);
callbacks.remove(id);