dist/@ajsf/core/bundles/ajsf-core.umd.js
/**
     * 'commonItems' function
     *
     * Accepts any number of strings or arrays of string values,
     * and returns a single array containing only values present in all inputs.
     *
     * // {...string|string[]} ...arrays -
     * // {string[]} -
     */
'commonItems' function
Accepts any number of strings or arrays of string values,
and returns a single array containing only values present in all inputs.


' commonItems ' function Accepts any number of strings or arrays of string values and returns a single array containing only values present in all inputs .
function commonItems() {
        var e_5, _a;
        var arrays = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            arrays[_i] = arguments[_i];
        }
        var returnItems = null;
        var _loop_1 = function (array) {
            if (isString(array)) {
                array = [array];
            }
            returnItems = returnItems === null ? __spread(array) :
                returnItems.filter(function (item) { return array.includes(item); });
            if (!returnItems.length) {
                return { value: [] };
            }
        };
        try {
            for (var arrays_1 = __values(arrays), arrays_1_1 = arrays_1.next(); !arrays_1_1.done; arrays_1_1 = arrays_1.next()) {
                var array = arrays_1_1.value;
                var state_1 = _loop_1(array);
                if (typeof state_1 === "object")
                    return state_1.value;
            }
        }
        catch (e_5_1) { e_5 = { error: e_5_1 }; }
        finally {
            try {
                if (arrays_1_1 && !arrays_1_1.done && (_a = arrays_1.return)) _a.call(arrays_1);
            }
            finally { if (e_5) throw e_5.error; }
        }
        return returnItems;
    }
function commonItems ( ) { var e_5 , _a ; var arrays = [ ] ; for ( var _i = 0 ; _i < arguments . length ; _i ++ ) { arrays [ _i ] = arguments [ _i ] ; } var returnItems = null ; var _loop_1 = function ( array ) { if ( isString ( array ) ) { array = [ array ] ; } returnItems = returnItems === null ? __spread ( array ) : returnItems . filter ( function ( item ) { return array . includes ( item ) ; } ) ; if ( ! returnItems . length ) { return { value : [ ] } ; } } ; try { for ( var arrays_1 = __values ( arrays ) , arrays_1_1 = arrays_1 . next ( ) ; ! arrays_1_1 . done ; arrays_1_1 = arrays_1 . next ( ) ) { var array = arrays_1_1 . value ; var state_1 = _loop_1 ( array ) ; if ( typeof state_1 === "object" ) return state_1 . value ; } } catch ( e_5_1 ) { e_5 = { error : e_5_1 } ; } finally { try { if ( arrays_1_1 && ! arrays_1_1 . done && ( _a = arrays_1 . return ) ) _a . call ( arrays_1 ) ; } finally { if ( e_5 ) throw e_5 . error ; } } return returnItems ; }
'commonItems' function
 Accepts any number of strings or arrays of string values,
 and returns a single array containing only values present in all inputs.
' commonItems ' function Accepts any number of strings or arrays of string values and returns a single array containing only values present in all inputs .