Sha256: 98f3368a9e9cefa6247b7429682558ec2dd3adb2a930f859b77ca4743516f76d

Contents?: true

Size: 886 Bytes

Versions: 264

Compression:

Stored size: 886 Bytes

Contents

var baseGetTag = require('./_baseGetTag'),
    isObjectLike = require('./isObjectLike');

/** `Object#toString` result references. */
var numberTag = '[object Number]';

/**
 * Checks if `value` is classified as a `Number` primitive or object.
 *
 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
 * classified as numbers, use the `_.isFinite` method.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
 * @example
 *
 * _.isNumber(3);
 * // => true
 *
 * _.isNumber(Number.MIN_VALUE);
 * // => true
 *
 * _.isNumber(Infinity);
 * // => true
 *
 * _.isNumber('3');
 * // => false
 */
function isNumber(value) {
  return typeof value == 'number' ||
    (isObjectLike(value) && baseGetTag(value) == numberTag);
}

module.exports = isNumber;

Version data entries

264 entries across 262 versions & 29 rubygems

Version Path
trusty-cms-6.3.1 node_modules/lodash/isNumber.js
immosquare-cleaner-0.1.51 node_modules/lodash/isNumber.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/isNumber.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/isNumber.js
immosquare-cleaner-0.1.50 node_modules/lodash/isNumber.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/isNumber.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/isNumber.js
immosquare-cleaner-0.1.49 node_modules/lodash/isNumber.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/isNumber.js
immosquare-cleaner-0.1.48 node_modules/lodash/isNumber.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/isNumber.js