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

x/ddc_vim/deps.ts>fn.add

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

Append the item {expr} to List or Blob {object}. Returns the resulting List or Blob. Examples:

:let alist = add([1, 2, 3], item)
:call add(mylist, "woodstock")

Note that when {expr} is a List it is appended as a single item. Use extend() to concatenate Lists. When {object} is a Blob then {expr} must be a number. Use insert() to add an item at another position. Returns 1 if {object} is not a List or a Blob.

Can also be used as a method:

mylist->add(val1)->add(val2)

Parameters

denops: Denops
object: unknown
expr: unknown

Returns

Promise<unknown[] | unknown>