diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-04-21 17:29:10 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2024-04-21 17:42:17 +0200 |
| commit | 5c8dfb0e379cd4ae8de418e7aa554dbc5ab7f236 (patch) | |
| tree | c39982ecde44ac2b01111149f81bee8b5a284f40 /runtime/doc/lua.txt | |
| parent | d9d890562e43493c999f8a6ff2b848959686f5b6 (diff) | |
| download | rneovim-5c8dfb0e379cd4ae8de418e7aa554dbc5ab7f236.tar.gz rneovim-5c8dfb0e379cd4ae8de418e7aa554dbc5ab7f236.tar.bz2 rneovim-5c8dfb0e379cd4ae8de418e7aa554dbc5ab7f236.zip | |
refactor(lua): rename tbl_isarray => isarray
tbl_isarray was not released yet, so it will not go through
a deprecation cycle.
ref #24572
Diffstat (limited to 'runtime/doc/lua.txt')
| -rw-r--r-- | runtime/doc/lua.txt | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 3561c77dd5..de1e432790 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2029,6 +2029,26 @@ vim.is_callable({f}) *vim.is_callable()* Return: ~ (`boolean`) `true` if `f` is callable, else `false` +vim.isarray({t}) *vim.isarray()* + Tests if `t` is an "array": a table indexed only by integers (potentially + non-contiguous). + + If the indexes start from 1 and are contiguous then the array is also a + list. |vim.islist()| + + Empty table `{}` is 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`. + + See also: ~ + • https://github.com/openresty/luajit2#tableisarray + vim.islist({t}) *vim.islist()* Tests if `t` is a "list": a table indexed only by contiguous integers starting from 1 (what |lua-length| calls a "regular array"). @@ -2044,7 +2064,7 @@ vim.islist({t}) *vim.islist()* (`boolean`) `true` if list-like table, else `false`. See also: ~ - • |vim.tbl_isarray()| + • |vim.isarray()| vim.list_contains({t}, {value}) *vim.list_contains()* Checks if a list-like table (integer keys without gaps) contains `value`. @@ -2296,26 +2316,6 @@ vim.tbl_get({o}, {...}) *vim.tbl_get()* Return: ~ (`any`) Nested value indexed by key (if it exists), else nil -vim.tbl_isarray({t}) *vim.tbl_isarray()* - Tests if `t` is an "array": a table indexed only by integers (potentially - non-contiguous). - - If the indexes start from 1 and are contiguous then the array is also a - list. |vim.islist()| - - Empty table `{}` is 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`. - - See also: ~ - • https://github.com/openresty/luajit2#tableisarray - vim.tbl_isempty({t}) *vim.tbl_isempty()* Checks if a table is empty. |