fargv
Version:
Multi-customizable parser of process.argv for nodejs.
19 lines (10 loc) • 300 B
JavaScript
/*
taken from jQuery: https://jquery.com/ && modified by Cameron Osakiski
*/
function isNumeric(obj, removeUnderscores) {
if(removeUnderscores && typeof obj == "string") {
obj = obj.replace(/_/g, "");
}
return !isNaN( parseFloat(obj) ) && isFinite( obj );
}
module.exports = isNumeric;