UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

10 lines (8 loc) 237 B
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 };