How can I convert words to numbers in JavaScript?
As an example is there a javascript/jQuery library/plugin that will take a string "one hundred and two" and return the int 102.
var myInt = stringToInt("one hundred and two");
console.log(myInt);
=> 102
I specifically require a string-to-number conversion and not number-to-string conversion. Suggested solutions have come up short:
jsfiddle.net/joepegler/g0vwy44n