blob: b1cef6fbfc135bbf219a8a4012936108ac3f4a8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---@meta
--- Returns `true` when the given Lua table contains neither non-nil array elements nor non-nil key-value pairs, or `false` otherwise.
---
--- This API can be JIT compiled.
--- Usage:
---
--- ```lua
--- local isempty = require "table.isempty"
---
--- print(isempty({})) -- true
--- print(isempty({nil, dog = nil})) -- true
--- print(isempty({"a", "b"})) -- false
--- print(isempty({nil, 3})) -- false
--- print(isempty({cat = 3})) -- false
--- ```
---
---@param t table
---@return boolean
local function isempty(t) end
return isempty
|