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 'use strict' in documentation for ES6 classes #682

Closed
gh-amistry opened this issue Apr 22, 2016 · 6 comments
Closed

add 'use strict' in documentation for ES6 classes #682

gh-amistry opened this issue Apr 22, 2016 · 6 comments

Comments

@gh-amistry
Copy link

Examples in the "Events" section of the documentation relating to newly introduced ES6 functionality, like classes, don't work unless strict mode is specified, but 'use strict'doesn't appear in the example.

My suggestion is to include 'use strict' in these examples so that the code can simply be copied and pasted as-is and run as working examples.

@jasnell jasnell added the docs label Apr 22, 2016
@gh-amistry gh-amistry changed the title add 'use strict' for ES6 classes add 'use strict' in documentation for ES6 classes Apr 22, 2016
@jasnell
Copy link
Member

jasnell commented Apr 22, 2016

SGTM. Interested in submitting a PR? :-)

@evanlucas
Copy link
Contributor

IIRC that will no longer be an issue once v6 drops, but a good idea IMO

@gh-amistry
Copy link
Author

Where do I find this content in the repo?
https://nodejs.org/dist/latest-v5.x/docs/api/events.html

@phillipj
Copy link
Member

@gh-amistry
Copy link
Author

@phillipj Thanks!

@phillipj
Copy link
Member

@gh-amistry np! I'm closing this issue for now, but don't hesitate to comment here if you've got any questions. See you in the node repo.

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

4 participants