Completed the API docs.
Changed parseDigits to use regexp.
Now using NaN as an error flag that propagates easily.