Files
est-frame/node_modules/core-js/internals/a-constructor.js
2025-10-22 05:38:27 +00:00

12 lines
369 B
JavaScript
Executable File

'use strict';
var isConstructor = require('../internals/is-constructor');
var tryToString = require('../internals/try-to-string');
var $TypeError = TypeError;
// `Assert: IsConstructor(argument) is true`
module.exports = function (argument) {
if (isConstructor(argument)) return argument;
throw new $TypeError(tryToString(argument) + ' is not a constructor');
};