node-tcheck
Lightweight type check library for JavaScript
Installation
$ npm install tcheck
How to include
var tcheck = ;
Examples
foo
is of type String
Verify if var foo = 'bar'; console; // Should output "true"
Multiple type checks
var str1 = 'foo'; var str2 = 'bar'; var num1 = 12345; var num2 = 1234; var date = ; console; // Should also output "true"
Using own classes
{ thisname = name; thisage = age; } var userObj = 'Joko van Klaas' 30; console; // Outputs "true"