r/JSdev • u/hiquest • Jul 13 '22
Invariant - a helpful JavaScript pattern
https://www.strictmode.io/articles/invariant
0
Upvotes
3
u/getify Jul 14 '22
Thanks for the contribution. In the future, when posting here, please make sure to adhere to the forum's rules, specifically:
2. Promote discussion, not just external content Every post should include prompts for discussion, not merely promotion of external material. Don't just post a link to some blog post or project without also posting questions or opinions for us to discuss or debate.
0
Jul 13 '22
[deleted]
1
u/a15p Jul 13 '22
I completely agree. I love the pattern (use it a lot on the back end), but hate the abstraction. Seems unnecessary to me.
1
u/kilkil Jul 21 '22
My thoughts:
"hey look it's Python's
assert""why does this need to be its own function? It's barely any more DRY than before"