Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
413 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var GetIntrinsic = require('get-intrinsic');
|
---|
4 |
|
---|
5 | var callBind = require('./');
|
---|
6 |
|
---|
7 | var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
---|
8 |
|
---|
9 | module.exports = function callBoundIntrinsic(name, allowMissing) {
|
---|
10 | var intrinsic = GetIntrinsic(name, !!allowMissing);
|
---|
11 | if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
---|
12 | return callBind(intrinsic);
|
---|
13 | }
|
---|
14 | return intrinsic;
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.