get-method.js 320 B

123456789
  1. var aCallable = require('../internals/a-callable');
  2. var isNullOrUndefined = require('../internals/is-null-or-undefined');
  3. // `GetMethod` abstract operation
  4. // https://tc39.es/ecma262/#sec-getmethod
  5. module.exports = function (V, P) {
  6. var func = V[P];
  7. return isNullOrUndefined(func) ? undefined : aCallable(func);
  8. };