section and within annotations for ldoc
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
|
||||
--- @section Util
|
||||
|
||||
--- Safely wraps an index for an array.
|
||||
--- @within Util
|
||||
-- @param array table The array to index.
|
||||
-- @param index number The desired index (can be out of bounds).
|
||||
-- @return number The wrapped index within the array's bounds.
|
||||
@@ -8,6 +11,7 @@ function Util.safeindex(array, index)
|
||||
end
|
||||
|
||||
--- Navigates to a screen by its ID.
|
||||
--- @within Util
|
||||
-- @param screen_id string The ID of the screen to go to.
|
||||
function Util.go_to_screen_by_id(screen_id)
|
||||
local screen = Screen.get_by_id(screen_id)
|
||||
@@ -20,6 +24,7 @@ function Util.go_to_screen_by_id(screen_id)
|
||||
end
|
||||
|
||||
--- Checks if a table contains a specific value.
|
||||
--- @within Util
|
||||
-- @param t table The table to check.
|
||||
-- @param value any The value to look for.
|
||||
function Util.contains(t, value)
|
||||
|
||||
Reference in New Issue
Block a user