数组去重
数组
Optional
过滤逻辑
unique([1, 2, 3, 1, 2, 3]); /// [1, 2, 3]unique([{id: 1, value: 'hello'}, {id: 2, value: 'world'}, {id: 2, value: 'world', others: true}], (a, b) => a.id === b.id); /// [id1, id2 带 true] Copy
unique([1, 2, 3, 1, 2, 3]); /// [1, 2, 3]unique([{id: 1, value: 'hello'}, {id: 2, value: 'world'}, {id: 2, value: 'world', others: true}], (a, b) => a.id === b.id); /// [id1, id2 带 true]
数组去重