MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / isFromStdlib

Function isFromStdlib

packages/language/src/utils.ts:64–67  ·  view source on GitHub ↗
(node: AstNode)

Source from the content-addressed store, hash-verified

62}
63
64export function isFromStdlib(node: AstNode) {
65 const model = AstUtils.getContainerOfType(node, isModel);
66 return !!model && !!model.$document && model.$document.uri.path.endsWith(STD_LIB_MODULE_NAME);
67}
68
69export function isAuthInvocation(node: AstNode) {
70 return isInvocationExpr(node) && node.function.ref?.name === 'auth' && isFromStdlib(node.function.ref);

Callers 2

customAcceptorMethod · 0.90
isAuthInvocationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected