-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Closed
Description
Here
function emailClients(clients) {
clients
.filter(isClientActive)
.forEach(email);
}
function isClientActive(client) {
const clientRecord = database.lookup(client);
return clientRecord.isActive();
}the function name suggests that all client will be emailed. I'd rather do
function emailActiveClients(clients) {
clients
.filter(isActive)
.forEach(email);
}
function isActive(client) {
const clientRecord = database.lookup(client);
return clientRecord.isActive();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels