Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
find-property.ts741 B
import { ASTNode } from 'vscode-json-languageservice'; import { isObjectNode, isPropertyNode } from './node-types'; /** * Find the first property from the current node * @param node * @param property */ export function findProperty( node: ASTNode | undefined, property: string ): ASTNode | undefined { if (isPropertyNode(node) && node.valueNode) { node = node.valueNode; } if (isObjectNode(node)) { for (const child of node.properties) { if (child.keyNode.value === property) { return child; } if (isObjectNode(child.valueNode)) { const found = findProperty(child.valueNode, property); if (found) { return found; } } } } return undefined; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server