refactor
This commit is contained in:
20
js/commander.js
Normal file
20
js/commander.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const commander = require("commander");
|
||||
const program = new commander.Command();
|
||||
const something = program.parse(process.argv);
|
||||
|
||||
let lib;
|
||||
|
||||
function parse() {
|
||||
return something;
|
||||
}
|
||||
|
||||
function args() {
|
||||
return something.args;
|
||||
}
|
||||
|
||||
lib = {
|
||||
args,
|
||||
parse
|
||||
};
|
||||
|
||||
module.exports = lib;
|
||||
Reference in New Issue
Block a user