Validating arguments in JavaScript like a boss
In software engineering we try to discover and eliminate bugs as soon as possible. One of most important heuristics here is validation of input/output on functions and methods. If you are going with TypeScript or Flow, you are fine. But if not? Then we have to manually validate at least input (arguments). But what would be the best way doing it? First comes to mind aproba library. It’s “ridiculously” light-weight and equally popular: