is-method-named.js 249 B

123456789
  1. 'use strict';
  2. const isMethodNamed = (node, name) =>
  3. node.type === 'CallExpression'
  4. && node.callee.type === 'MemberExpression'
  5. && node.callee.property.type === 'Identifier'
  6. && node.callee.property.name === name;
  7. module.exports = isMethodNamed;