prototype.chain source
_.prototype.chain()
Enables explicit method chaining on the wrapper object.
Returns (Object)
Returns the new lodash
wrapper instance.
Example
var users = [
{ 'user': 'barney', 'age': 36 },
{ 'user': 'fred', 'age': 40 }
];
// without explicit chaining
_(users).head();
// => { 'user': 'barney', 'age': 36 }
// with explicit chaining
_(users)
.chain()
.head()
.pick('user')
.value();
// => { 'user': 'barney' }