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

x/denops_std/function/mod.ts>max

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

Return the maximum value of all items in {expr}. Example:

echo max([apples, pears, oranges])

{expr} can be a List or a Dictionary. For a Dictionary, it returns the maximum of all values in the Dictionary. If {expr} is neither a List nor a Dictionary, or one of the items in {expr} cannot be used as a Number this results in an error. An empty List or Dictionary results in zero.

Can also be used as a method:

mylist->max()

Parameters

denops: Denops
expr: unknown

Returns

Promise<number>