MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / parseArgs

Function parseArgs

scripts/recover-project.mjs:115–132  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

113}
114
115function parseArgs(argv) {
116 const options = {}
117 for (let i = 0; i < argv.length; i += 1) {
118 const arg = argv[i]
119 if (arg === '--source') {
120 options.source = argv[i + 1]
121 i += 1
122 continue
123 }
124 if (arg === '--out') {
125 options.out = argv[i + 1]
126 i += 1
127 continue
128 }
129 throw new Error(`Unknown argument: ${arg}`)
130 }
131 return options
132}
133
134async function assertDirectory(dirPath) {
135 const stat = await fs.stat(dirPath)

Callers 2

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected