UNPKG

ut2

Version:

一个现代 JavaScript 实用工具库。[点击查看在线文档]。

13 lines (10 loc) 395 B
import isArray from './isArray.js'; import uniq from './uniq.js'; function union(array, other, iteratee, strickCheck) { if (other === void 0) { other = []; } if (strickCheck === void 0) { strickCheck = false; } array = isArray(array) ? array : []; other = isArray(other) ? other : []; return uniq(array.concat(other), iteratee, strickCheck); } export { union as default };