Simon Priet 9e2991e668 init
2021-09-05 22:53:58 +02:00

6 lines
237 B
JavaScript

module.exports = function (it, Constructor, name, forbiddenField) {
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
throw TypeError(name + ': incorrect invocation!');
} return it;
};