MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / argValue

Function argValue

scripts/migration/service-split-postgres-cli.ts:38–41  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

36const args = process.argv.slice(2);
37const hasArg = (name: string): boolean => args.includes(name);
38const argValue = (name: string): string | undefined => {
39 const index = args.indexOf(name);
40 return index >= 0 ? args[index + 1] : undefined;
41};
42
43const apply = hasArg("--apply");
44const inputJson = argValue("--input-json");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected