目录
当前位置: 首页 > 文档资料 > Lazy.js 英文文档 >

ObjectLikeSequence

优质
小牛编辑
136浏览
2023-12-01

An ObjectLikeSequence object represents a sequence of key/value pairs.

The initial sequence you get by wrapping an object with Lazy(object) is an ObjectLikeSequence.

All methods of ObjectLikeSequence that conceptually should return something like an object return another ObjectLikeSequence.

Examples

var obj = { foo: 'bar' };

Lazy(obj).assign({ bar: 'baz' })   // instanceof Lazy.ObjectLikeSequence
Lazy(obj).defaults({ bar: 'baz' }) // instanceof Lazy.ObjectLikeSequence
Lazy(obj).invert()                 // instanceof Lazy.ObjectLikeSequence