UNPKG

394 BJavaScriptView Raw
1'use strict';
2var uncurryThis = require('../internals/function-uncurry-this');
3var aCallable = require('../internals/a-callable');
4
5module.exports = function (object, key, method) {
6 try {
7 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
8 return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
9 } catch (error) { /* empty */ }
10};