securityos/node_modules/eslint-plugin-unicorn/rules/utils/is-object-method.js

12 lines
293 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
module.exports = (node, object, method) => {
const {callee} = node;
return (
callee.type === 'MemberExpression'
&& callee.object.type === 'Identifier'
&& callee.object.name === object
&& callee.property.type === 'Identifier'
&& callee.property.name === method
);
};