var assert = require('./assert'); var getTypeName = require('./getTypeName'); module.exports = function forbidNewOperator(x, type) { assert(!(x instanceof type), function () { return 'Cannot use the new operator to instantiate the type ' + getTypeName(type); }); };