diff --git a/docs/bait.txt b/docs/bait.txt index fdc712f..2b6f7ae 100644 --- a/docs/bait.txt +++ b/docs/bait.txt @@ -2,6 +2,8 @@ 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. diff --git a/emmyLuaDocs/bait.lua b/emmyLuaDocs/bait.lua index a5ecebd..c2c4b60 100644 --- a/emmyLuaDocs/bait.lua +++ b/emmyLuaDocs/bait.lua @@ -12,6 +12,9 @@ function bait.catch(name, cb) end --- @param cb function function bait.catchOnce(name, cb) end +--- Returns a table with hooks on the event with `name`. +function bait.hooks() end + --- 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.