/**
 * @since Last modified: 2024-07-11 09:30:49
 * @function getIntArr
 * @description Finding the intersection of multiple arrays of data.
 */
'use strict';
import { T_el, T_obj } from '../../../types/ax';
import ax from '../ax';
import valToArr from './valToArr';
const getIntArr = (data: (string|any[])[], hyphen: string = ax.config.splitHyphen): any[] => {
    let arrs = data.map((k: any) => {
        return typeof k === 'string' ? valToArr(k, hyphen) : k;
    });
    return arrs.reduce((prev: any, cur: any) =>
        prev.filter((k: any) => cur.includes(k))
    );
}
export default getIntArr;
