Added mocha (http://mochajs.org/) tests.
Fixed documentation comment and number validation (now it accepts also things like "10e1").