Converts `value` to a finite number.
toFinite(3.2)
// => 3.2
toFinite(Number.MIN_VALUE)
// => 5e-324
toFinite(Infinity)
// => 1.7976931348623157e+308
toFinite('3.2')
// => 3.2
Name | Type | Attribute | Description |
---|---|---|---|
value | The value to convert. |
{ "comment": "/**\r\n * Converts `value` to a finite number.\r\n *\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * toFinite(3.2)\r\n * // => 3.2\r\n *\r\n * toFinite(Number.MIN_VALUE)\r\n * // => 5e-324\r\n *\r\n * toFinite(Infinity)\r\n * // => 1.7976931348623157e+308\r\n *\r\n * toFinite('3.2')\r\n * // => 3.2\r\n */", "meta": { "range": [ 557, 836 ], "filename": "toFinite.js", "lineno": 28, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100009827", "name": "toFinite", "type": "FunctionDeclaration", "paramnames": [ "value" ] }, "vars": { "value": "toFinite~value", "sign": "toFinite~sign" } }, "description": "Converts `value` to a finite number.", "since": "4.12.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "Lang", "value": "Lang" } ], "params": [ { "type": { "names": [ "*" ] }, "description": "The value to convert.", "name": "value" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "Returns the converted number." } ], "examples": [ "toFinite(3.2)\r// => 3.2\r\rtoFinite(Number.MIN_VALUE)\r// => 5e-324\r\rtoFinite(Infinity)\r// => 1.7976931348623157e+308\r\rtoFinite('3.2')\r// => 3.2" ], "name": "toFinite", "longname": "toFinite", "kind": "function", "scope": "global", "___id": "T000002R000903", "___s": true, "filepath": "toFinite.js" }