UNPKG
cliclopts
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.0
Command line options helper and usage printer
github.com/finnp/cliclopts
finnp/cliclopts
cliclopts
/
example.js
22 lines
(18 loc)
•
297 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var
cliclopts =
require
(
'./'
)
var
options = [ { name:
'verbose'
, abbr:
'v'
, alias: [
'loud'
],
boolean
:
true
, help:
'be verbose'
}, { name:
'path'
, abbr:
'p'
,
default
:
'dat.json'
, help:
'path to file'
} ]
var
clopts =
cliclopts
(options) clopts.
print
()