Afanasev_Stepan_PIbd-21_IP/ИП 3 лаба/node_modules/call-bind/callBound.js
[USERNAME] 0dd26716dc Lab2-5
2024-01-10 16:11:49 +04:00

16 lines
413 B
JavaScript

'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('./');
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
module.exports = function callBoundIntrinsic(name, allowMissing) {
var intrinsic = GetIntrinsic(name, !!allowMissing);
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
return callBind(intrinsic);
}
return intrinsic;
};