is-object-method.js 293 B

1234567891011
  1. 'use strict';
  2. module.exports = (node, object, method) => {
  3. const {callee} = node;
  4. return (
  5. callee.type === 'MemberExpression'
  6. && callee.object.type === 'Identifier'
  7. && callee.object.name === object
  8. && callee.property.type === 'Identifier'
  9. && callee.property.name === method
  10. );
  11. };