Validate numbers in JavaScript - IsNumeric() - Stack Overflow:
I think is worth sharing this set of 30 unit tests made to numerous function implementations, and also share the one that passes all my tests:

function isNumber(n) {
     return !isNaN(parseFloat(n)) && isFinite(n);
}

Thanks again, SO.

Labels: