Skip to content

Update tonumber() to properly behave as in Lua :#40

Open
florentpoujol wants to merge 1 commit intomherkender:masterfrom
florentpoujol:hex_to_number
Open

Update tonumber() to properly behave as in Lua :#40
florentpoujol wants to merge 1 commit intomherkender:masterfrom
florentpoujol:hex_to_number

Conversation

@florentpoujol
Copy link

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

- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant