Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.len

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.len
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { len } = fn;

The result is a Number, which is the length of the argument. When {expr} is a String or a Number the length in bytes is used, as with strlen(). When {expr} is a List the number of items in the List is returned. When {expr} is a Blob the number of bytes is returned. When {expr} is a Dictionary the number of entries in the Dictionary is returned. Otherwise an error is given and returns zero.

Can also be used as a method:

mylist->len()

Parameters

denops: Denops
expr: unknown

Returns

Promise<number>