Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAvoid Passing Null #460
Comments
This comment has been minimized.
This comment has been minimized.
|
In other words: functions that get called with a parameter named |
This comment has been minimized.
This comment has been minimized.
|
I think people are used to typing There may be a case where you'd want to do |
This comment has been minimized.
This comment has been minimized.
Unless you're callback is just a pass-through: f(..., function (err, result) {
console.log('Called back with ', err, result)
callback(err, result)
}) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hmm probably a good point (this came up at work today and we found it was
|
xjamundx commentedMar 15, 2016
Not sure if there is a rule for this yet, but it could probably done in a plugin.
Bad:
Good:
Why is that better?