_.prototype.chain()
Creates a lodash
wrapper instance with explicit method chain sequences enabled.
Since
0.1.0
Returns
(Object): Returns the new lodash
wrapper instance.
Example
var users = [{ 'user': 'barney', 'age': 36 },{ 'user': 'fred', 'age': 40 }];// A sequence without explicit chaining._(users).head();// => { 'user': 'barney', 'age': 36 }// A sequence with explicit chaining._(users).chain().head().pick('user').value();// => { 'user': 'barney' }
当前内容版权归 lodash.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 lodash.com .