MCPcopy Create free account
hub / github.com/deta/surf / parseArguments

Function parseArguments

app/src/preload/overlay.ts:23–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22// TODO: moved to utils?
23function parseArguments() {
24 const args = {}
25
26 process.argv.forEach((arg) => {
27 if (arg.startsWith('--')) {
28 const [key, value] = arg.substring(2).split('=')
29 args[key] = value || true
30 }
31 })
32
33 return args
34}
35const args = parseArguments()
36
37const eventHandlers = {

Callers 1

overlay.tsFile · 0.85

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected