UNPKG

@arco-design/web-vue

Version:

Arco Design Vue 2.0: A Vue.js 3 UI Library

12 lines (11 loc) 370 B
const union = (target, source, difference = false) => { return difference ? target.filter((item) => !source.includes(item)) : Array.from(new Set(target.concat(source))); }; const getReverse = (array) => { const result = []; for (let i = 0; i < array.length; i++) { result[i] = array[array.length - 1 - i]; } return result; }; export { getReverse, union };