Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number constructor whitspace handling deficiencies #3

Closed
Xotic750 opened this issue Nov 2, 2015 · 4 comments
Closed

Number constructor whitspace handling deficiencies #3

Xotic750 opened this issue Nov 2, 2015 · 4 comments

Comments

@Xotic750
Copy link

Xotic750 commented Nov 2, 2015

See paulmillr/es6-shim#368

@ljharb
Copy link
Owner

ljharb commented Nov 2, 2015

I'm confused - how does ToNumber interact with trim?

@Xotic750 Xotic750 changed the title ToNumber trim deficiencies Number constructor whitspace handling deficiencies Nov 2, 2015
@Xotic750
Copy link
Author

Xotic750 commented Nov 2, 2015

Sorry, probably just my bad language. But what we are talking about here is the internal trimming of whitespace when the Number constructor is used as a casting operator.
Number(' 2 ') === 2
So just like with trim, different environments handle internal trimming differently and inconsistently.

@ljharb
Copy link
Owner

ljharb commented Nov 2, 2015

After implementing the fix for es6-shim based on your tests, I totally get it now. Thanks for explaining further!

@Xotic750
Copy link
Author

Xotic750 commented Nov 2, 2015

You're welcome. ;)

@ljharb ljharb closed this as completed in b033fb9 Nov 2, 2015
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

No branches or pull requests

2 participants