MCPcopy
hub / github.com/lebab/lebab / parse

Method parse

src/OptionParser.js:56–65  ·  view source on GitHub ↗

* Parses and validates command line options from argv. * * - On success returns object with options. * - On failure throws exceptions with error message to be shown to user. * * @param {String[]} argv Raw command line arguments * @return {Object} options object

(argv)

Source from the content-addressed store, hash-verified

54 * @return {Object} options object
55 */
56 parse(argv) {
57 this.program.parse(argv);
58
59 return {
60 inFile: this.getInputFile(),
61 outFile: this.opts().outFile,
62 replace: this.getReplace(),
63 transforms: this.getTransforms(),
64 };
65 }
66
67 getInputFile() {
68 if (this.program.args.length > 1) {

Callers 3

parseFunction · 0.80
parseFunction · 0.80
constructorMethod · 0.80

Calls 4

getInputFileMethod · 0.95
optsMethod · 0.95
getReplaceMethod · 0.95
getTransformsMethod · 0.95

Tested by

no test coverage detected