MCPcopy
hub / github.com/TanStack/query / isFunctionCallOf

Function isFunctionCallOf

packages/query-codemods/src/utils/index.cjs:170–182  ·  view source on GitHub ↗
(node, selector)

Source from the content-addressed store, hash-verified

168 }
169
170 const isFunctionCallOf = (node, selector) => {
171 if (!isCallExpression(node)) {
172 return false
173 }
174
175 const parts = selector.split('.')
176
177 return parts.length === 1
178 ? isIdentifier(node.callee) && node.callee.name === parts[0]
179 : isMemberExpression(node.callee) &&
180 node.callee.object.name === parts[0] &&
181 node.callee.property.name === parts[1]
182 }
183
184 const getSelectorByImports = (imports, path) =>
185 imports.namespace

Callers 1

Calls 3

isCallExpressionFunction · 0.85
isMemberExpressionFunction · 0.85
isIdentifierFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…