MCPcopy
hub / github.com/lodash/lodash / baseToNumber

Function baseToNumber

lodash.js:4273–4281  ·  view source on GitHub ↗

* The base implementation of `_.toNumber` which doesn't ensure correct * conversions of binary, hexadecimal, or octal string values. * * @private * @param {*} value The value to process. * @returns {number} Returns the number.

(value)

Source from the content-addressed store, hash-verified

4271 * @returns {number} Returns the number.
4272 */
4273 function baseToNumber(value) {
4274 if (typeof value == 'number') {
4275 return value;
4276 }
4277 if (isSymbol(value)) {
4278 return NAN;
4279 }
4280 return +value;
4281 }
4282
4283 /**
4284 * The base implementation of `_.toString` which doesn't convert nullish

Callers 1

createMathOperationFunction · 0.85

Calls 1

isSymbolFunction · 0.85

Tested by

no test coverage detected