source/node/tools/searching-instance.js
function getAllEntries(groups) {
    return groups.reduce(function(current, group) {
        const theseEntries = group.getEntries();
        const subEntries = getAllEntries(group.getGroups());
        if (theseEntries.length > 0) {
            current = current.concat(theseEntries);
        }
        if (subEntries.length > 0) {
            current = current.concat(subEntries);
        }
        return current;
    }, []);
}
function getAllEntries(groups) {
    return groups.reduce(function(current, group) {
        const theseEntries = group.getEntries();
        const subEntries = getAllEntries(group.getGroups());
        if (theseEntries.length > 0) {
            current = current.concat(theseEntries);
        }
        if (subEntries.length > 0) {
            current = current.concat(subEntries);
        }
        return current;
    }, []);
}
function getAllEntries ( groups ) { return groups . reduce ( function ( current , group ) { const theseEntries = group . getEntries ( ) ; const subEntries = getAllEntries ( group . getGroups ( ) ) ; if ( theseEntries . length > 0 ) { current = current . concat ( theseEntries ) ; } if ( subEntries . length > 0 ) { current = current . concat ( subEntries ) ; } return current ; } , [ ] ) ; }
Get all entries within a collection of groups
@param {Array.<Group>} groups An array of groups
@returns {Array.<Entry>} An array of entries
Get all entries within a collection of groups