MCPcopy
hub / github.com/GitbookIO/gitbook / isNodeAtCursor

Function isNodeAtCursor

packages/expr/src/autocomplete.ts:562–564  ·  view source on GitHub ↗
(node: AcornNode, cursorOffset: number)

Source from the content-addressed store, hash-verified

560}
561
562function isNodeAtCursor(node: AcornNode, cursorOffset: number) {
563 return cursorOffset >= node.start && cursorOffset <= node.end;
564}
565
566function isAnyNode(node: AcornNode): node is AnyNode {
567 return 'type' in node;

Callers 3

getSuggestionsMethod · 0.85
getSuggestionsForNodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected