MCPcopy Index your code
hub / github.com/cameri/nostream / getFlag

Function getFlag

scripts/verify-index-impact.ts:42–49  ·  view source on GitHub ↗
(name: string, def: number)

Source from the content-addressed store, hash-verified

40
41const args = process.argv.slice(2)
42const getFlag = (name: string, def: number): number => {
43 const idx = args.indexOf(`--${name}`)
44 if (idx === -1) {
45 return def
46 }
47 const value = Number(args[idx + 1])
48 return Number.isFinite(value) ? value : def
49}
50
51const EVENTS = getFlag('events', 200_000)
52const PUBKEYS = getFlag('pubkeys', 500)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected