MCPcopy Create free account
hub / github.com/EvoMap/evolver / getNodeScriptToken

Function getNodeScriptToken

src/ops/lifecycle.js:465–481  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

463}
464
465function getNodeScriptToken(tokens) {
466 for (var i = 0; i < tokens.length; i++) {
467 if (!looksLikeNodeToken(tokens[i])) continue;
468 for (var j = i + 1; j < tokens.length; j++) {
469 var token = tokens[j];
470 if (!token) continue;
471 if (token === '--') return tokens[j + 1] || null;
472 if (token[0] === '-') {
473 if (nodeOptionIsEvalMode(token)) return null;
474 if (nodeOptionTakesValue(token) && !token.includes('=')) j++;
475 continue;
476 }
477 return token;
478 }
479 }
480 return null;
481}
482
483function sameRealPath(left, right) {
484 try {

Callers 1

Calls 3

looksLikeNodeTokenFunction · 0.85
nodeOptionIsEvalModeFunction · 0.85
nodeOptionTakesValueFunction · 0.85

Tested by

no test coverage detected