Converts data to type Number.

@method DataSourceBase.parseNumber
@param oData {String | Number | Boolean} Data to convert. Note, the following
values return as null: null, undefined, NaN, "".
@return {Number} A number, or null.
@static
340651
function(oData) {
    if(!lang.isValue(oData) || (oData === "")) {
        return null;
    }

    //Convert to number
    var number = oData * 1;
    
    // Validate
    if(lang.isNumber(number)) {
        return number;
    }
    else {
        return null;
    }
}
363307
function NUMBER_VALIDATOR(v) {
  v = (v || '').toString()
  var match = v.match(LENGTH_REGEXP)

  if (match && !match[1]) {
    return {value: parseFloat(v)}
  }

  return {
    value: null,
    reason: function reason(k, v, result) {
      return 'ERROR: property value `' + v + '` is not supported for `' + util.camelCaseToHyphened(k) + '` (only number is supported)'
    }
  }
}
1071528
function parseValueToStringOrNumber ( value ) {
	let resolvedValue, resolvedUnitValue;
	try {
		resolvedUnitValue = parseUnit(value);
		if ( unitTypes.indexOf(resolvedUnitValue.type) !== -1 ) {
			resolvedValue = new types.Number(resolvedUnitValue.value, resolvedUnitValue.unit);
		} else if ( resolvedUnitValue.type === 'percentage' ) {
			resolvedValue = new types.Number(resolvedUnitValue.value, '%');
		} else {
			resolvedValue = new types.String(resolvedUnitValue.value);
		}
	} catch ( e ) {
		resolvedValue = new types.String(value);
	}
	return resolvedValue;
}
978984
function inferDtype(value) {
  return (
    (value === null || isUndefined(value)) ? null :
    isNumber(value) ? 'number' :
    isBoolean(value) ? 'boolean' :
    isString(value) ? 'string' :
    isDate(value) ? 'date' :
    'object'
  );
}
294638
function(rawValue) {
			// Null and undefined values first
			if (rawValue === null || typeof(rawValue) === 'undefined') {
				return NaN;
			}
			// isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values
			if (typeof(rawValue) === 'number' && !isFinite(rawValue)) {
				return NaN;
			}
			// If it is in fact an object, dive in one more level
			if (typeof(rawValue) === 'object') {
				if ((rawValue instanceof Date) || (rawValue.isValid)) {
					return rawValue;
				}
				return this.getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);
			}

			// Value is good, return it
			return rawValue;
		}
802248
function getDataType(obj){
	var dataType = toClass.call( obj );
	dataType = dataType.split(' ')[1];
	dataType = dataType.substring(0, dataType.length-1);

	return dataType;
}
932069
public static Number readNumericStoredAsText(DataInputStream dataInput, int length) throws IOException {
		try {
			byte t_float[] = new byte[length];
			int readed = dataInput.read(t_float);
			if (readed != length) {
				throw new EOFException("failed to read:" + length + " bytes");
			}
			t_float = DBFUtils.removeSpaces(t_float);
			t_float = DBFUtils.removeNullBytes(t_float);
			if (t_float.length > 0 && DBFUtils.isPureAscii(t_float) && !DBFUtils.contains(t_float, (byte) '?') && !DBFUtils.contains(t_float, (byte) '*')) {
				String aux = new String(t_float, StandardCharsets.US_ASCII).replace(',', '.');
				if (".".equals(aux)) {
					return BigDecimal.ZERO;
				}
				return new BigDecimal(aux);
			} else {
				return null;
			}
		} catch (NumberFormatException e) {
			throw new DBFException("Failed to parse Float: " + e.getMessage(), e);
		}
	}
1337423
function isNumber( value ) {
	return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf();
}
1197263
function(oData) {
    // Special case null and undefined
    if(!lang.isValue(oData)) {
        return null;
    }
    
    //Convert to string
    var string = oData + "";

    // Validate
    if(lang.isString(string)) {
        return string;
    }
    else {
        YAHOO.log("Could not convert data " + lang.dump(oData) + " to type String", "warn", this.toString());
        return null;
    }
}
356499
function getType(value) {
        // inspired by http://techblog.badoo.com/blog/2013/11/01/type-checking-in-javascript/

        // handle null in old IE
        if (value === null) {
            return 'null';
        }

        // handle DOM elements
        if (value && (value.nodeType === 1 || value.nodeType === 9)) {
            return 'element';
        }

        var s = Object.prototype.toString.call(value);
        var type = s.match(/\[object (.*?)\]/)[1].toLowerCase();

        // handle NaN and Infinity
        if (type === 'number') {
            if (isNaN(value)) {
                return 'nan';
            }
            if (!isFinite(value)) {
                return 'infinity';
            }
        }

        return type;
    }
535720
function mkNumber(val) {
            var sign = 1;
            if (val.charAt(0) == '-') {
                sign = -1;
                val = val.substring(1);
            }
            if (Lang.NUMBER_DEC.test(val))
                return sign * parseInt(val, 10);
            else if (Lang.NUMBER_HEX.test(val))
                return sign * parseInt(val.substring(2), 16);
            else if (Lang.NUMBER_OCT.test(val))
                return sign * parseInt(val.substring(1), 8);
            else if (val === 'inf')
                return sign * Infinity;
            else if (val === 'nan')
                return NaN;
            else if (Lang.NUMBER_FLT.test(val))
                return sign * parseFloat(val);
            throw Error("illegal number value: " + (sign < 0 ? '-' : '') + val);
        }
630083
function __isNumber(number) {
			if (!isChar(number)) invaildCharacter(number);
			var code = number.charCodeAt(0);
			return code >= ZERO && code <= NINE;
		}
214503
function(key, callback) {
		if (typeof data[key] == 'undefined') {
			callback && callback(null, null)
		} else if (typeof data[key] == 'string' || typeof data[key] == 'number' || typeof data[key] == 'boolean') {
			callback && callback(null, data[key])
		} else {
			callback && callback(typeError('getBytes', 'string or number', key))
		}
	}
155927
function commaNumber(inputNumber, optionalSeparator, optionalDecimalChar) {

  // we'll strip off and hold the decimal value to reattach later.
  // we'll hold both the `number` value and `stringNumber` value.
  let number, stringNumber, decimal

  // default `separator` is a comma
  const separator = optionalSeparator   || ','

  // default `decimalChar` is a period
  const decimalChar = optionalDecimalChar || '.'

  switch (typeof inputNumber) {

    case 'string':

      // if there aren't enough digits to need separators then return it
      // NOTE: some numbers which are too small will get passed this
      //       when they have decimal values which make them too long here.
      //       but, the number value check after this switch will catch it.
      if (inputNumber.length < (inputNumber[0] === '-' ? 5 : 4)) {
        return inputNumber
      }

      // remember it as a string in `stringNumber` and convert to a Number
      stringNumber = inputNumber

      // if they're not using the Node standard decimal char then replace it
      // before converting.
      number = decimalChar !== '.' ? Number(stringNumber.replace(decimalChar, '.'))
                                   : Number(stringNumber)
      break

    // convert to a string.
    // NOTE: don't check if the number is too small before converting
    //       because we'll need to return `stringNumber` anyway.
    case 'number':
      stringNumber = String(inputNumber)
      number       = inputNumber
      break

    // return invalid type as-is
    default: return inputNumber
  }

  // when it doesn't need a separator or isn't a number then return it
  if ((-1000 < number && number < 1000) || isNaN(number) || !isFinite(number)) {
    return stringNumber
  }

  // strip off decimal value to append to the final result at the bottom
  let decimalIndex = stringNumber.lastIndexOf(decimalChar)

  if (decimalIndex > -1) {
    decimal = stringNumber.slice(decimalIndex)
    stringNumber = stringNumber.slice(0, -decimal.length)
  }

  // else {
  //   decimal = null
  // }

  // finally, parse the string and add in separators
  stringNumber = parse(stringNumber, separator)

  // if there's a decimal value add it back on the end.
  // NOTE: we sliced() it off including the decimalChar, so it's good.
  return decimal ? stringNumber + decimal : stringNumber

}
1048713
function ParseNationalNumber(number, md) {
    if (!md.possiblePattern.test(number) ||
        !md.nationalPattern.test(number)) {
      return null;
    }
    // Success.
    return new NationalNumber(md, number);
  }
607628
public static Integer getIntegerProperty(Properties properties, String key) {
        String property = getStringProperty(properties, key);
        if (property == null) {
            return null;
        }
        Integer value;
        try {
            value = Integer.parseInt(property);
        } catch (RuntimeException e) {
            throw new ODataClientRuntimeException("Unable to parse property. " + property, e);
        }
        return value;
    }
260846
private static Object toExternalNumber( BigDecimal number)
    {
    return
      Optional.ofNullable(
        toObject(
          number,
          ObjectUtils::toInt,
          ObjectUtils::toLong))

      .orElse( number);
    }