Expose V8 C++ type checking to JS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

11 lines
222 B

var v8type = require('../');
console.dir(v8type.is([1,2,3], v8type.ARRAY));
// true
console.dir(v8type.is({}, v8type.NULL));
// false
// is does not check inheritence
console.dir(v8type.is([], v8type.OBJECT));
// false