Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>uniq

๐Ÿ“š Standard module for denops.vim
Go to Latest
function uniq
import { uniq } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

Remove second and succeeding copies of repeated adjacent {list} items in-place. Returns {list}. If you want a list to remain unmodified make a copy first:

:let newlist = uniq(copy(mylist))

The default compare function uses the string representation of each item. For the use of {func} and {dict} see sort().

Returns zero if {list} is not a List.

Can also be used as a method:

mylist->uniq()

Parameters

denops: Denops
list: unknown
optional
func: unknown
optional
dict: unknown

Returns

Promise<unknown[]>