core-js-pure
Version:
Standard library
13 lines (11 loc) • 480 B
JavaScript
var globalThis = require('../internals/global-this');
var path = require('../internals/path');
module.exports = function (CONSTRUCTOR, METHOD) {
var Namespace = path[CONSTRUCTOR + 'Prototype'];
var pureMethod = Namespace && Namespace[METHOD];
if (pureMethod) return pureMethod;
var NativeConstructor = globalThis[CONSTRUCTOR];
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
return NativePrototype && NativePrototype[METHOD];
};
;