@shunter, do you know how smart we can expect browsers to be about precomputing all these constants instead of recoputing them every time the function is called?  Would it be better to move them to module scope?