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

x/ddc_vim/deps.ts>fn.copy

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

Make a copy of {expr}. For Numbers and Strings this isn't different from using {expr} directly. When {expr} is a List a shallow copy is created. This means that the original List can be changed without changing the copy, and vice versa. But the items are identical, thus changing an item changes the contents of both Lists. A Dictionary is copied in a similar way as a List. Also see deepcopy(). Can also be used as a method:

mylist->copy()

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>