UNPKG

read-and-excute

Version:

a tool can read command line args and excute

9 lines (6 loc) 278 B
var Args = require('../src/index.js'); var argsTest = new Args(); argsTest.addCommand('add1', 'madksjfefs', function(){console.log('test')}) argsTest.addOptions('add1', ['chrome', 'firefox']); argsTest.addOptions('add2', ['chrome', 'firefox']); console.log(argsTest);