Type
This Project adds better type checking from basic JS types.
Installation
npm install --save @philipp122/type
Usage:
Type supports 14 primitive JS Types: Undefined, Null, Boolean, Number, NaN, Infinity, String, Symbol, Array, Object, WeakSet, Set, WeakMap and Map as well as 2 aliases of Number: Integer and Float.
Any value can be checked against those types:
const Type = ; // ALL of the following return trueconsole;console;console;console;console;console;console;console;console;console;console;console;console;console;console;console;console;
See index.test.js for more examples.