例子:
var arr = [{name: 'a', age: 23}, {name: 'b', age: 24}]
var newArr = _.enhance(arr, { married : false });
console.log(newArr); // [{name: 'a', age: 23, married : false}, {name: 'b', age: 24, married : false}]
我正在寻找可以做到这一点的东西。注意,在 lodash 中没有增强。可以用 lodash 做到这一点吗?
如果没有 - 可能的添加?
谢谢,