Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 569 Bytes

intersectionBy.md

File metadata and controls

28 lines (17 loc) · 569 Bytes

intersectionBy


简介

对多个数组数据附条件取交集

是否影响原引用内容

所属分类

示例

const _ = require('lodash');
_.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); // => [2.1]
_.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); // => [{ 'x': 1 }]

官方文档

intersectionBy