UNPKG
read-and-excute
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
a tool can read command line args and excute
github.com/Tzxhy/read-and-excute
Tzxhy/read-and-excute
read-and-excute
/
test
/
addOptions.test.js
9 lines
(6 loc)
•
278 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
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);