MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / resolveMemberPath

Function resolveMemberPath

oxlint-plugin-drizzle.js:11–19  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

9}
10
11function resolveMemberPath(node) {
12 if (node.type === 'Identifier') return node.name;
13 if (node.type === 'MemberExpression' && node.property.type === 'Identifier') {
14 const objectPath = resolveMemberPath(node.object);
15 return objectPath ? `${objectPath}.${node.property.name}` : null;
16 }
17 if (node.type === 'ThisExpression') return 'this';
18 return null;
19}
20
21function isDrizzleObj(node, drizzleObjectName) {
22 // Check the object the method is called on (e.g. db in db.delete, ctx.db in ctx.db.delete)

Callers 1

isDrizzleObjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected