I don\'t get how hard it is to discern a string containing a number from other strings in JavaScript.
Number(\'\') evaluates to 0, while
Number(\'\')
0
This might be insane depending on the length of your string, but you could split it into an array of individual characters and then test each character with isNaN to determine if it's a number or not.
isNaN