diff options
Diffstat (limited to 'lua/pets/utils.lua')
| -rw-r--r-- | lua/pets/utils.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/pets/utils.lua b/lua/pets/utils.lua index dbf1191..366de2a 100644 --- a/lua/pets/utils.lua +++ b/lua/pets/utils.lua @@ -88,4 +88,13 @@ function M.parse_popup_hl(highlight) ) end +function M.table_includes(table, key) + for _, value in ipairs(table) do + if value == key then + return true + end + end + return false +end + return M |