Hilbish/docs/bait.txt

13 lines
513 B
Plaintext
Raw Normal View History

2021-10-16 19:38:49 +00:00
catch(name, cb) > Catches a hook with `name`. Runs the `cb` when it is thrown
2021-12-07 21:41:41 +00:00
catchOnce(name, cb) > Same as catch, but only runs the `cb` once and then removes the hook
2022-10-11 21:43:22 +00:00
hooks(name) -> {cb, cb...} > Returns a table with hooks on the event with `name`.
2022-08-17 22:01:55 +00:00
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.
2021-10-16 19:38:49 +00:00
throw(name, ...args) > Throws a hook with `name` with the provided `args`
2022-02-25 22:00:39 +00:00