How could I do it in Node.js to recognize if a string is a valid number?
Here are some examples of what I want:
"22" => true
"- 22" => true
"-22.23" => true
"22a" => false
"2a2" => false
"a22" => false
"22 asd" => false
I dont actually need to return "true" or "false", but I need an unequivocally way to distinguish them. It seems like isNaN isnt available in node.js...