Skip to main content
Module

x/denops_std/function/mod.ts>items

📚 Standard module for denops.vim
Go to Latest
function items
import { items } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Return a List with all the key-value pairs of {dict}. Each List item is a list with two items: the key of a {dict} entry and the value of this entry. The List is in arbitrary order. Also see keys() and values(). Example:

for [key, value] in items(mydict)
   echo key .. ': ' .. value
endfor

A List or a String argument is also supported. In these cases, items() returns a List with the index and the value at the index.

Can also be used as a method:

mydict->items()

Parameters

denops: Denops
dict: unknown

Returns

Promise<unknown[]>