import { makeRe } from "minimatch";
export function filterPlatformAccounts(accounts, filters) {
    const filterCurrencyRegexes = filters.currencies
        ? filters.currencies.map(filter => makeRe(filter))
        : null;
    return accounts.filter(account => {
        if (filterCurrencyRegexes &&
            !filterCurrencyRegexes.some(regex => account.currency.match(regex))) {
            return false;
        }
        return true;
    });
}
//# sourceMappingURL=filters.js.map