cb ?
Closed this issue · 1 comments
bradws commented
Hi,
What does 'cb' stand for in your code:
e.g. in:
config.userIdentity(function(id){
// determine if this user is authenticated or not
id.isAuthenticated(function(user, cb){
// note that the "user" in this case, is the user
// that was supplied by the routeHelpers.getUser function
var isAuthenticated = false;
if (user) {
isAuthenticated = user.isLoggedIn();
}
cb(null, isAuthenticated);
});
});
Thanks!
mxriverlynn commented
Hey @bradws - cb
is short for callback
- the function that is called when the current function is complete, allowing the app to continue. this probably isn't the best naming convention, but i haven't yet found a better one for general purposes.