MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / readOptionValue

Function readOptionValue

node/cli.js:71–77  ·  view source on GitHub ↗
(args, index, option)

Source from the content-addressed store, hash-verified

69}
70
71function readOptionValue(args, index, option) {
72 const value = args[index + 1];
73 if (!value || value.startsWith('-')) {
74 throw new Error(`Missing value for ${option}`);
75 }
76 return value;
77}
78
79function readInlineOptionValue(arg, option) {
80 const value = arg.slice((option + '=').length);

Callers 1

parseArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected