RAHHH
This commit is contained in:
9
backend/frontend/node_modules/tcomb/lib/is.js
generated
vendored
Normal file
9
backend/frontend/node_modules/tcomb/lib/is.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var isType = require('./isType');
|
||||
|
||||
// returns true if x is an instance of type
|
||||
module.exports = function is(x, type) {
|
||||
if (isType(type)) {
|
||||
return type.is(x);
|
||||
}
|
||||
return x instanceof type; // type should be a class constructor
|
||||
};
|
||||
Reference in New Issue
Block a user