CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
_baseToNumber.js25 linesDownload Raw Back to lodash-es
1import isSymbol from './isSymbol.js';2 3/** Used as references for various `Number` constants. */4var NAN = 0 / 0;5 6/**7 * The base implementation of `_.toNumber` which doesn't ensure correct8 * conversions of binary, hexadecimal, or octal string values.9 *10 * @private11 * @param {*} value The value to process.12 * @returns {number} Returns the number.13 */14function baseToNumber(value) {15  if (typeof value == 'number') {16    return value;17  }18  if (isSymbol(value)) {19    return NAN;20  }21  return +value;22}23 24export default baseToNumber;25 
basant307/AI_Governance_Project · CoolFace