Skip to content

Exponential notation fix - #12

Open
Lukasz-pluszczewski wants to merge 2 commits into
timjansen:masterfrom
Lukasz-pluszczewski:exponential-notation-fix
Open

Lukasz-pluszczewski wants to merge 2 commits into
timjansen:masterfrom
Lukasz-pluszczewski:exponential-notation-fix

Conversation

@Lukasz-pluszczewski

Copy link
Copy Markdown

Current implementation of toJSON incorrectly handles exponential notation (1.3e-12 becomes 1.3"e"-12). I've added another capture group to "requote" regex so that it will leave numbers in exponential notation alone. Example: https://jsbin.com/fujajayewu/3/edit?js,console

Updated toJSON function to correctly handle exponential notation
Updated toJSON function in readme to correctly handle exponential notation
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