MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / readArgValue

Function readArgValue

scripts/dev-server.cjs:11–23  ·  view source on GitHub ↗
(flagNames)

Source from the content-addressed store, hash-verified

9const PUBLIC_SMOKE_RETRY_MS = 1_000;
10
11function readArgValue(flagNames) {
12 for (let i = 0; i < extraArgs.length; i += 1) {
13 const arg = extraArgs[i];
14 if (flagNames.includes(arg)) {
15 return extraArgs[i + 1];
16 }
17 const match = flagNames.find((flag) => arg.startsWith(`${flag}=`));
18 if (match) {
19 return arg.slice(match.length + 1);
20 }
21 }
22 return undefined;
23}
24
25function runNext(args, env) {
26 return new Promise((resolve, reject) => {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected