lua.js icon indicating copy to clipboard operation
lua.js copied to clipboard

Update tonumber() to properly behave as in Lua :

Open florentpoujol opened this issue 10 years ago • 0 comments

  • 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.

florentpoujol avatar Oct 18 '14 09:10 florentpoujol