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

Capitalization in Documentation #93

Open
alanjames1987 opened this issue Jan 6, 2015 · 1 comment
Open

Capitalization in Documentation #93

alanjames1987 opened this issue Jan 6, 2015 · 1 comment

Comments

@alanjames1987
Copy link

Should the documentation be using fb instead of FB as the variable holding the exported value of require('fb')?

var FB =  require('fb');

// VS

var fb =  require('fb');

Reasoning:

In JavaScript all functions can use the new keyword to create a new instance of that function, similar to how classes work in other languages. Functions intended to be used as classes are usually given a capital first letter to differentiate them from functions intended to be used as regular functions. This is not required but is generally a naming standard follow most JavaScript developers and encouraged in the Node community.

This library doesn't export a function but an object, which can't use the new keyword to create a new instance.

It's a minor change and probably petty but it would make the documentation more consistent with Node community practices.

@dirkbonhomme
Copy link

+1

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