function-uncurry-this-accessor.js 394 B

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