Check if the given value is a number.

@category Validate
@param {*} value - The value to check.
@return {boolean} Returns 'true' if the given value is a number, else 'false'.
513480
function isNumber(value) {
        var isNaN = Number.isNaN || window.isNaN;

        return typeof value === 'number' && !isNaN(value);
    }
737374
function typeOf (value) {
  var type = {
    hasValue: false,
    isArray: false,
    isPOJO: false,
    isNumber: false,
  };

  if (value !== undefined && value !== null) {
    type.hasValue = true;
    var typeName = typeof value;

    if (typeName === 'number') {
      type.isNumber = !isNaN(value);
    }
    else if (Array.isArray(value)) {
      type.isArray = true;
    }
    else {
      type.isPOJO =
        (typeName === 'object') &&
        !(value instanceof RegExp) &&
        !(value instanceof Date);
    }
  }

  return type;
}
279111
function (value) {
            if (this.options) {
                for (var i = 0, l = this.options.length; i < l; i++) {
                    if (this.options[i].value === value) {
                        return i;
                    }
                }
            }
            return -1;
        }
789733
private boolean isTrue(final Object value) {

		if (value != null) {

			if (value instanceof Boolean) {

				return (Boolean)value;
			}

			if (value instanceof String) {

				return Boolean.valueOf((String)value);
			}

			// not sure if good..
			if (value instanceof Number) {

				return ((Number)value).longValue() > 0;
			}
		}

		return false;
	}
1285639
def is_numeric(property_name, *, numtype="float", min=None, max=None,
                 present_optional=False, message=None):
    """"""
    if numtype == "int":
      cast = util.try_parse_int
    elif numtype == "decimal":
      cast = util.try_parse_decimal
    elif numtype == "float":
      cast = util.try_parse_float
    else:
      raise ValueError("numtype argument must be one of: int, decimal, float")

    def check(val):
      """Checks that a value can be parsed as a number."""
      if val is None:
        return present_optional
      else:
        is_num, new_val = cast(val)
        if not is_num:
          return False
        else:
          if min is not None and new_val < min:
            return False
          if max is not None and new_val > max:
            return False
          return True

    if not message:
      msg = ["must be a"]
      if numtype == "int":
        msg.append("whole number")
      else:
        msg.append("number")
      if min is not None and max is not None:
        msg.append("between {0} and {1}".format(min, max))
      elif min is not None:
        msg.append("greater than or equal to {0}".format(min))
      elif max is not None:
        msg.append("less than or equal to {0}".format(max))
      message = " ".join(msg)

    return Validation(check, property_name, message)
823100
function () {

// Parse a number value.

            var number,
                string = '';

            if (ch === '-') {
                string = '-';
                next('-');
            }
            while (ch >= '0' && ch <= '9') {
                string += ch;
                next();
            }
            if (ch === '.') {
                string += '.';
                while (next() && ch >= '0' && ch <= '9') {
                    string += ch;
                }
            }
            if (ch === 'e' || ch === 'E') {
                string += ch;
                next();
                if (ch === '-' || ch === '+') {
                    string += ch;
                    next();
                }
                while (ch >= '0' && ch <= '9') {
                    string += ch;
                    next();
                }
            }
            number = +string;
            if (isNaN(number)) {
                error("Bad number");
            } else {
                return number;
            }
        }
467601
function number(value) {
  var parsedNumber = Number.parseInt(value, 10);

  // couldn't parse it
  if (typeOf(parsedNumber) != 'number') {
    return throwModifierError('number', value, {message: 'Invalid Number'});
  }

  return parsedNumber;
}
1058883
private function check($value) {

		if(true === is_string($value) || is_numeric($value)) {

			if(true === $this -> strict) {
				return true === is_int($value);
			}

			return !in_array(preg_match('/^-?[0-9]+$/', $value), [false, 0]);
		}

		return false;
	}
604478
public function isValueValid($value) {
		return $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecificationType || $value instanceof DataType\TextType;
	}
269281
def value_validate(self, value):
        
        if not isinstance(value, six.integer_types):
            raise tldap.exceptions.ValidationError("should be a integer")

        try:
            return str(value)
        except (TypeError, ValueError):
            raise tldap.exceptions.ValidationError("is invalid integer")
118149
function isValueObject(obj) {
	return (obj instanceof Number) || (obj instanceof String) || (obj instanceof Boolean) || (obj === null);
}
37962
function check_value(val, min, max) {
    val = +val;
    if (typeof(val) != 'number' || val < min || val > max || Math.floor(val) !== val) {
        throw new TypeError("\"value\" argument is out of bounds");
    }
    return val;
}
456815
function isNotNumber(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && (typeof value === 'number' || value instanceof Number)) {
        throw TypeException.expectedType(assertionTypes.IS_NOT_NUMBER, value, '<number>', message, id);
    }
}
504336
function isAlphaNumericArray( value ) {
	var len;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( var i = 0; i < len; i++ ) {
		if ( !isAlphaNumeric( value[i] ) ) {
			return false;
		}
	}
	return true;
}
954424
function strToNumber(value) {
    // Convert strings to numbers
    if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
        return Number(value);
    }
    if (typeof value !== 'number') {
        throw new Error(value + " is not a number");
    }
    return value;
}
1288249
public function validate($value)
    {
        if (!is_numeric($value)) {
            return false;
        }
        // Convert possible strings to number
        $number = $value + 0;

        return is_double($number) || !$this->strict && is_int($number);
    }
360655
function (value) {
        if (/^\d{15}$/.test(value)) {
            return true;
        }
        if ((/^\d{17}[0-9xX]$/).test(value)) {
            let vs = '1,0,x,9,8,7,6,5,4,3,2'.split(','),
                ps = '7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2'.split(','),
                ss = value.toLowerCase().split(''),
                r = 0;
            for (let i = 0; i < 17; i++) {
                r += ps[i] * ss[i];
            }
            let isOk = (vs[r % 11] === ss[17]);
            return isOk;
        }
        return false;
    }