mherkender/lua.js — pull request #40 by florentpoujol (2014-10-18 09:13:56+00:00)
Title: Update tonumber() to properly behave as in Lua :

- Return null instead of NaN whenever the 'e' argument is not a number or a string.
- Properly convert hex strings.
- Return null when a string (other than a hex number) contains any characters other than those found in digits + space.

Tests are included.