toNumber

Lang
since 4.0.0

Arguments

  • * The value to process.

Returns

number the number.

Converts value to a number.

Example of Lodash _.toNumber

_.toNumber(3.2);
// => 3.2

_.toNumber(Number.MIN_VALUE);
// => 5e-324

_.toNumber(Infinity);
// => Infinity

_.toNumber('3.2');
// => 3.2