mirror of https://github.com/Hilbis/Hilbish
13 lines
513 B
Plaintext
13 lines
513 B
Plaintext
catch(name, cb) > Catches a hook with `name`. Runs the `cb` when it is thrown
|
|
|
|
catchOnce(name, cb) > Same as catch, but only runs the `cb` once and then removes the hook
|
|
|
|
hooks(name) -> {cb, cb...} > Returns a table with hooks on the event with `name`.
|
|
|
|
release(name, catcher) > Removes the `catcher` for the event with `name`
|
|
For this to work, `catcher` has to be the same function used to catch
|
|
an event, like one saved to a variable.
|
|
|
|
throw(name, ...args) > Throws a hook with `name` with the provided `args`
|
|
|