Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

_js_require

codeintel.parsers.treesitter_parser._js_require

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Calls (2)
SymbolFileResolved by
_strip_quotestreesitter_parser.pysame file
_texttreesitter_parser.pysame file
Inside (1)
SymbolFileResolved by
treesitter_parsertreesitter_parser.pysame file
codeintel.parsers.treesitter_parser._js_requirebackend/app/codeintel/parsers/treesitter_parser.py, lines 174–182Open source
def _js_require(node, src):    fn = node.child_by_field_name("function")    if fn is None or _text(fn, src) != "require":        return None    args = node.child_by_field_name("arguments")    if args is None or args.named_child_count == 0:        return None    first = args.named_children[0]    return _strip_quotes(_text(first, src)) if first.type == "string" else None

What the index recorded

Signature
def _js_require(node, src):
File
backend/app/codeintel/parsers/treesitter_parser.py
Lines
174–182
Parser
python-ast
Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9
Call sites
3 named, 2 resolved, 1 left unlinked

Read it on GitHub at this commit