MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / CallExpression

Function CallExpression

src/client/sandbox.mjs:301–306  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

299 WhileStatement: loop,
300 DoWhileStatement: loop,
301 CallExpression(node) {
302 if (node.callee.type == "Identifier" && node.callee.name == "require" &&
303 node.arguments.length == 1 && node.arguments[0].type == "Literal" &&
304 typeof node.arguments[0].value == "string" && !dependencies.includes(node.arguments[0].value))
305 dependencies.push(node.arguments[0].value)
306 },
307 ImportDeclaration(node) {
308 dependencies.push(node.source.value)
309 let req = "require(" + node.source.raw + ")", text

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected