source: frontend/node_modules/call-bound/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 687 bytes
Line 
1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4
5var callBindBasic = require('call-bind-apply-helpers');
6
7/** @type {(thisArg: string, searchString: string, position?: number) => number} */
8var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
9
10/** @type {import('.')} */
11module.exports = function callBoundIntrinsic(name, allowMissing) {
12 /* eslint no-extra-parens: 0 */
13
14 var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
15 if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
16 return callBindBasic(/** @type {const} */ ([intrinsic]));
17 }
18 return intrinsic;
19};
Note: See TracBrowser for help on using the repository browser.