Skip to main content
Module

x/lodash_es/mod.ts>toInteger

lodash for deno use
Latest
function toInteger
import { toInteger } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

Converts value to an integer.

Note: This method is loosely based on ToInteger.

Examples

_.toInteger(3.2); // => 3

_.toInteger(Number.MIN_VALUE); // => 0

_.toInteger(Infinity); // => 1.7976931348623157e+308

_.toInteger('3.2'); // => 3

Parameters

value

The value to convert.