3 ms·
We completely agree about what a blacklist is. I am saying the function should not be called isVeganIngredient if it returns true for ham. It’s misleading. It’
by callumlocke 9y ago
We completely agree about what a blacklist is.
I am saying the function should not be called isVeganIngredient if it returns true for ham. It’s misleading. It’s bad design.
Two possible solutions:
1. Invert the return value, and change the function name to isKnownNonVeganIngredient (and take similar steps for the other functions).
2. Even better, scrap the functions entirely, and just release the data (e.g. publish a dumb JSON package on npm called non-vegan-ingredients), so people can use everyday array methods to consume it however they want.
I’m not the one downvoting you btw.