I understand that _.defaults modifies its first argument (object) and also returns that value. However the return value of this function is not documented on http://underscorejs.org/#defaults
It's nice to be able to rely on the return value, e.g. in Backbone this is done:
Wouldn't it make sense to document the return value so people can feel comfortable relying on this behavior?
EDIT: I suppose it is somewhat documented by the => line in the code sample there, however I would still propose just using the word "returns" in the description, like you do with other similar functions.
Yeah, technically the => notation indicates the return value. If you want to open a pull request to make the docs more explicit, I'd merge it.
Docs: more explicit return value of _.defaults; Closes #2625