2018-08-24 18:09:42 +02:00

4 lines
152 B
JavaScript

module.exports = function(it, Constructor, name){
if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
return it;
};