How to use the isNumeric function from lodash

Find comprehensive JavaScript lodash.isNumeric code examples handpicked from public code repositorys.

207
208
209
210
211
212
213
214
215
216
module.exports.isNative            = _.isNative;
module.exports.isNegative          = _.isNegative;
module.exports.isNil               = _.isNil;
module.exports.isNull              = _.isNull;
module.exports.isNumber            = _.isNumber;
module.exports.isNumeric           = _.isNumeric;
module.exports.isObject            = _.isObject;
module.exports.isObjectLike        = _.isObjectLike;
module.exports.isOdd               = _.isOdd;
module.exports.isPlainObject       = _.isPlainObject;
fork icon19
star icon122
watch icon0

+ 92 other calls in file

3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
// An integer contains an optional minus sign to begin and only the digits 0-9
// Objects that can be parsed that way are also considered ints, e.g. "123"
// Floats that are mathematically equal to integers are considered integers, e.g. 1.0
// See here for more discussion: http://stackoverflow.com/questions/1019515/javascript-test-for-an-integer
isInteger: function(i) {
  return _.isNumeric(i) && i % 1 === 0;
},

// A float is a numbr that is not an integer.
isFloat: function(n) {
fork icon3
star icon2
watch icon1

+ 117 other calls in file

Other functions in lodash

Sorted by popularity

function icon

lodash.get is the most popular function in lodash (7670 examples)