You could write a little utility for combining predicates:
const pred = (() => {
const and = p1 => p2 => x => p1(x) && p2(x)
const or = p1 => p2 => x => p1(x) || p2(x)
return { and, or }
})()
// ...
const isntSomeColor = a => a.color != $(this).data('color')
const isntSomeName = b => b.name != $(this).data('name')
const result = input.filter(pred.and(isntSomeColor)(isntSomeName))
In general both boolean conjunction and disjunction form monoids, and monoid returning functions also form monoids. So if you're using some functional programming library you could also do:
const preds = [
a => a.color != $(this).data('color'),
b => b.name != $(this).data('name')
]
const result = input.filter(arr.fold(fn(and))(preds))
&&condition