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

x/ddu_vim/deps.ts>fn.copy

Dark deno-powered UI framework for neovim/Vim
Very Popular
Go to Latest
function fn.copy
import { fn } from "https://deno.land/x/ddu_vim@v4.0.0/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>