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

Add quotes around function keyword #35

Closed
wants to merge 1 commit into from
Closed

Add quotes around function keyword #35

wants to merge 1 commit into from

Conversation

mrezentes
Copy link

Tests passing

@medikoo
Copy link
Owner

medikoo commented Jul 1, 2015

@mrezentes version with no quotes is syntactically valid (in ES5+) and es5-ext is not meant to support ES3. Can you shed more light on why you need that?

@mrezentes
Copy link
Author

I am running karma tests in browser stack. function is a keyword in Javascript. I don't think the word function cannot be used as a key in a key/value pair without quotes. This is the error that I am currently getting: IE 8.0.0 (Windows Vista 0.0.0) ERROR Expected identifier, string or number at /var/folders/7s/g48ds_0d09dgb28v7zb1c7mc0000gn/T/2e72f1fdd27e37aed14004c7345971d27664cf03.browserify:163:0 <- /Users/mrezentes/dev/paymentFrame.js/node_modules/es5-ext/object/is-object.js:3:0

@medikoo
Copy link
Owner

medikoo commented Jul 1, 2015

@mrezentes it is not allowed in old ES3 (on which is IE8 is based), but technically both event-emitter and es5-ext won't run in ES3 environment, and not quoting function would be the minor reason for that.

I think you should either reconfigure tests to not run it in IE8, or if you make event-emitter somehow working in IE8 (through shims and shams), then you need to also apply fix like that one -> https://github.com/medikoo/es5-fix#es5-fixastreserved-identifiers-to-literals this will clear that issue for you

@mrezentes
Copy link
Author

@medikoo Thanks for the info.

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.

None yet

2 participants