MCPcopy Index your code
hub / github.com/nodejs/node / isValidMemberExpressionPair

Function isValidMemberExpressionPair

tools/eslint-rules/prefer-optional-chaining.js:31–36  ·  view source on GitHub ↗
(left, right)

Source from the content-addressed store, hash-verified

29
30 // Check if a sequence of two nodes forms a valid member expression chain
31 function isValidMemberExpressionPair(left, right) {
32 return (
33 right.type === 'MemberExpression' &&
34 equalTokens(left, right.object)
35 );
36 }
37
38 // Generate the optional chaining expression
39 function generateOptionalChaining(ops, first, last) {

Callers 2

fixFunction · 0.85

Calls 1

equalTokensFunction · 0.85

Tested by

no test coverage detected