Well, I build this repository, because I consider it necessary to give my opinion based on my experience on how it is the best way to check data types in our projects using javascript. I think that JS is a great language that today is changing many ways of how to program, all this makes many programmers the lack of a static type checking system in variables at the time of compilation, causes in many people fear and uncertainty on how to handle certain aspects of an application.
There are basically two approaches, using "npm" modules or using the JS "typeof" native function.
- Using Type-check
- Using Fish-type by me :p
- Using Joi
Go to the next link to see 3 differents techniques to handle type check using only js.
Go to this link to see my last experiments, a function that decorate another function adding a type validation layer before run the function. The code use a special method of name the variables in a function.