Skip to main content
Module

x/denops_std/function/mod.ts>add

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

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. Can also be used as a |method|: mylist->add(val1)->add(val2)

Parameters

denops: Denops
object: unknown
expr: unknown

Returns

Promise<unknown>