MCPcopy Create free account
hub / github.com/TanStack/query / isFunctionDefinition

Function isFunctionDefinition

packages/query-codemods/src/utils/index.cjs:139–148  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

137 * @returns {boolean}
138 */
139 const isFunctionDefinition = (node) => {
140 const isArrowFunctionExpression = jscodeshift.match(node, {
141 type: jscodeshift.ArrowFunctionExpression.name,
142 })
143 const isFunctionExpression = jscodeshift.match(node, {
144 type: jscodeshift.FunctionExpression.name,
145 })
146
147 return isArrowFunctionExpression || isFunctionExpression
148 }
149
150 const warn = (message) => {
151 if (process.env.NODE_ENV !== 'test') {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected