MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getArg

Function getArg

packages/db/scripts/find-duplicate-events.ts:52–56  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

50}
51
52function getArg(name: string): string | undefined {
53 const prefix = `--${name}=`;
54 const match = process.argv.find((a) => a.startsWith(prefix));
55 return match ? match.slice(prefix.length) : undefined;
56}
57
58function hasFlag(name: string): boolean {
59 return process.argv.includes(`--${name}`);

Callers 1

parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected