MCPcopy
hub / github.com/formatjs/formatjs / getCalleeName

Function getCalleeName

packages/unplugin/transform.ts:433–442  ·  view source on GitHub ↗
(node: any)

Source from the content-addressed store, hash-verified

431 }
432
433 function getCalleeName(node: any): string | undefined {
434 if (node.type === 'Identifier') return node.name
435 if (
436 node.type === 'MemberExpression' ||
437 node.type === 'OptionalMemberExpression'
438 ) {
439 if (node.property?.type === 'Identifier') return node.property.name
440 }
441 return undefined
442 }
443
444 function handleCallExpression(node: CallExpression): void {
445 const calleeName = getCalleeName(node.callee)

Callers 1

handleCallExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected