Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
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.
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.