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

Function findAssignmentsTo

src/client/sandbox.mjs:383–390  ·  view source on GitHub ↗
(decls, ast)

Source from the content-addressed store, hash-verified

381}
382
383function findAssignmentsTo(decls, ast) {
384 let found = null
385 for (let i = 0; i < decls.length; i++)
386 walk.simple(decls[i].id, {
387 VariablePattern(node) { if (findAssignments(node.name, ast)) found = node.name }
388 }, null, null, "Pattern")
389 return found
390}
391
392function findAssignments(name, ast) {
393 let found = false

Callers 1

preprocessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected