/**
 * @since Last modified: 2024-09-04 20:13:03
 * @function getIntArr
 * @description Finding the intersection of multiple arrays of data.
 */
'use strict';
import config from '../global/config';
import valToArr from './valToArr';
const getIntArr = (data, hyphen = config.splitHyphen) => {
    let arrs = data.map((k) => {
        return typeof k === 'string' ? valToArr(k, hyphen) : k;
    });
    return arrs.reduce((prev, cur) => prev.filter((k) => cur.includes(k)));
};
export default getIntArr;
