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

incorrect naming of main object #4

Open
damienklinnert opened this issue Mar 5, 2013 · 2 comments
Open

incorrect naming of main object #4

damienklinnert opened this issue Mar 5, 2013 · 2 comments

Comments

@damienklinnert
Copy link

please start the main object name Doctape only with an uppercase letter, if it has to be invoked with new. Otherwise export doctape in lowercase.

This is common JS language style

@srijs
Copy link
Contributor

srijs commented Mar 19, 2013

Can you provide evidence for that?
E.g. https://github.com/rwldrn/idiomatic.js says constructor functions shall be named PascalCase.
If the issue is not clear enough this will be a wontfix, since we will be breaking current behavior badly.

@damienklinnert
Copy link
Author

the given guide IS your evidence, a constructor function in JavaScrpt is each function that is intended to be used with the new operator, because they assign values to 'this', which otherwise is the global space, resulting in a leak.

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