locbet / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

What function parseNumber should return? #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In FF9, Firebug 1.8.4 I try folloving code:

$.parseNumber("123", {format : "###", locale : 'en'});

And returns: Number {}.

I tried different parameters, wrong numbers, but result is allways the same.

Original issue reported on code.google.com by vladimir...@gmail.com on 29 Dec 2011 at 6:58

GoogleCodeExporter commented 8 years ago
It will always return a number no matter what, so in the case of "123" it 
returns 123 and for "abc" will return 0. I should probably add in NaN handling 
at some point.

Original comment by apar...@gmail.com on 18 Oct 2013 at 11:14