_.toNumber

_.toNumber(value)

Converts value to a number.

Since

4.0.0

Arguments

  1. value (*): The value to process.

Returns

(number): Returns the number.

Example

_.toNumber(3.2);
// => 3.2
 
_.toNumber(Number.MIN_VALUE);
// => 5e-324
 
_.toNumber(Infinity);
// => Infinity
 
_.toNumber('3.2');
// => 3.2
doc_Lodash
2016-11-27 16:41:17
Comments
Leave a Comment

Please login to continue.