Skip to main content
Module

x/denops_std/function/vim/mod.ts>mapnew

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

Like map() but instead of replacing items in {expr1} a new List or Dictionary is created and returned. {expr1} remains unchanged. Items can still be changed by {expr2}, if you don't want that use deepcopy() first.

Parameters

denops: Denops
expr1: unknown
expr2: unknown

Returns

Promise<
| unknown[]
| Record<string, unknown>
| unknown
| string
>