您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

callBound.js 413B

123456789101112131415
  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var callBind = require('./');
  4. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  5. module.exports = function callBoundIntrinsic(name, allowMissing) {
  6. var intrinsic = GetIntrinsic(name, !!allowMissing);
  7. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  8. return callBind(intrinsic);
  9. }
  10. return intrinsic;
  11. };