source: imaps-frontend/node_modules/core-js/modules/es.function.has-instance.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 905 bytes
Line 
1'use strict';
2var isCallable = require('../internals/is-callable');
3var isObject = require('../internals/is-object');
4var definePropertyModule = require('../internals/object-define-property');
5var isPrototypeOf = require('../internals/object-is-prototype-of');
6var wellKnownSymbol = require('../internals/well-known-symbol');
7var makeBuiltIn = require('../internals/make-built-in');
8
9var HAS_INSTANCE = wellKnownSymbol('hasInstance');
10var FunctionPrototype = Function.prototype;
11
12// `Function.prototype[@@hasInstance]` method
13// https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance
14if (!(HAS_INSTANCE in FunctionPrototype)) {
15 definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: makeBuiltIn(function (O) {
16 if (!isCallable(this) || !isObject(O)) return false;
17 var P = this.prototype;
18 return isObject(P) ? isPrototypeOf(P, O) : O instanceof this;
19 }, HAS_INSTANCE) });
20}
Note: See TracBrowser for help on using the repository browser.