Update JSDoc, throw RangeError correctly.

And fixed a stray tab.

I'm wondering if digitToBasic's flag can be refactored to elimination as the function appears to be private and is only ever called with 0 as the argument.