UNPKG

isnumeric

Version:

Determine if a JavaScript object is numeric

5 lines 410 B
/*! isnumeric (v0.3.3) (c) Lee Crossley <leee@hotmail.co.uk> (http://ilee.co.uk/) */ var isNumeric=function(e){return e="string"==typeof e?e.replace(/,/g,""):e,!isNaN(parseFloat(e))&&isFinite(e)&&"[object array]"!==Object.prototype.toString.call(e).toLowerCase()};"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=isNumeric),exports.isNumeric=isNumeric);