isEqual
_.isEqual(object, other)
执行两个对象之间的优化深度比较,确定他们是否应被视为相等。
var stooge = {name: 'moe', luckyNumbers: [13, 27, 34]};
var clone = {name: 'moe', luckyNumbers: [13, 27, 34]};
stooge == clone;
=> false
_.isEqual(stooge, clone);
=> true
_.isEqual(object, other)
执行两个对象之间的优化深度比较,确定他们是否应被视为相等。
var stooge = {name: 'moe', luckyNumbers: [13, 27, 34]};
var clone = {name: 'moe', luckyNumbers: [13, 27, 34]};
stooge == clone;
=> false
_.isEqual(stooge, clone);
=> true