You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should the documentation be using fb instead of FB as the variable holding the exported value of require('fb')?
varFB=require('fb');// VSvarfb=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.
The text was updated successfully, but these errors were encountered:
Should the documentation be using
fb
instead ofFB
as the variable holding the exported value ofrequire('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 thenew
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.
The text was updated successfully, but these errors were encountered: