Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async findMatchingRules() {
const accounts = await BankAccount.fetchAll()
const accountsById = keyBy(accounts, getDocumentId)
const matchingRules = this.rules
.map(this.makeRuleMatcher(accountsById))
.filter(Boolean)
return matchingRules
}