This seems to work:
Static binding:
String.isNumeric = function (value) {
return !isNaN(String(value) * 1);
};
Prototype binding:
String.prototype.isNumeric = function () {
return !isNaN(this.valueOf() * 1);
};
It will check single characters, as well as whole strings to see if they are numeric.