aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt23
1 files changed, 19 insertions, 4 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index f39adf4f8d..6fdf3775f6 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1928,6 +1928,20 @@ tbl_get({o}, {...}) *vim.tbl_get()*
Return: ~
any Nested value indexed by key (if it exists), else nil
+tbl_isarray({t}) *vim.tbl_isarray()*
+ Tests if a Lua table can be treated as an array (a table indexed by
+ integers).
+
+ Empty table `{}` is assumed to be an array, unless it was created by
+ |vim.empty_dict()| or returned as a dict-like |API| or Vimscript result,
+ for example from |rpcrequest()| or |vim.fn|.
+
+ Parameters: ~
+ • {t} (table)
+
+ Return: ~
+ (boolean) `true` if array-like table, else `false`.
+
tbl_isempty({t}) *vim.tbl_isempty()*
Checks if a table is empty.
@@ -1941,17 +1955,18 @@ tbl_isempty({t}) *vim.tbl_isempty()*
• https://github.com/premake/premake-core/blob/master/src/base/table.lua
tbl_islist({t}) *vim.tbl_islist()*
- Tests if a Lua table can be treated as an array.
+ Tests if a Lua table can be treated as a list (a table indexed by
+ consecutive integers starting from 1).
- Empty table `{}` is assumed to be an array, unless it was created by
+ Empty table `{}` is assumed to be an list, unless it was created by
|vim.empty_dict()| or returned as a dict-like |API| or Vimscript result,
for example from |rpcrequest()| or |vim.fn|.
Parameters: ~
- • {t} (table) Table
+ • {t} (table)
Return: ~
- (boolean) `true` if array-like table, else `false`
+ (boolean) `true` if list-like table, else `false`.
tbl_keys({t}) *vim.tbl_keys()*
Return a list of all keys used in a table. However, the order of the