Skip to main content
Module

x/ddc_vim/deps.ts>fn.abs

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.abs
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { abs } = fn;

Return the absolute value of {expr}. When {expr} evaluates to a |Float| abs() returns a |Float|. When {expr} can be converted to a |Number| abs() returns a |Number|. Otherwise abs() gives an error message and returns -1. Examples: echo abs(1.456) 1.456 echo abs(-5.456) 5.456 echo abs(-4) 4 Can also be used as a |method|: Compute()->abs() {only available when compiled with the |+float| feature}

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>