MCPcopy Create free account
hub / github.com/MisterBooo/LeetCodeAnimation / getArg

Function getArg

tools/scripts/review-site-changes.js:16–20  ·  view source on GitHub ↗
(name, fallback)

Source from the content-addressed store, hash-verified

14const args = process.argv.slice(2);
15
16function getArg(name, fallback) {
17 const index = args.indexOf(name);
18 if (index >= 0 && args[index + 1]) return args[index + 1];
19 return fallback;
20}
21
22const siteRoot = path.resolve(getArg("--site-root", process.env.ALGOMOOC_SITE_ROOT || DEFAULT_SITE_ROOT));
23const sourceRel = getArg("--source", DEFAULT_SOURCE);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected