【文件属性】:
文件名称:epic.optargs:js可选功能
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-21 16:53:58
JavaScript
史诗般的optargs
js可选参数
安装
$ npm install epic.optargs
设定档
{
name : '' , // string
index : 0 , // number
optional : true , // bool
type : '' , // string & array
value : '' // object, default value
}
输入别名
{
'bool' : 'boolean' ,
'class' : 'object' ,
'Class' : 'object' ,
'func' : 'function' ,
'fn' : 'function' ,
'int' : 'Number'
}
用法
var args = require ( 'epic.optargs' ) ;
// default conf
【文件预览】:
epic.optargs-master
----index.js(4KB)
----package.json(660B)
----test()
--------args.txt(558B)
--------test.js(605B)
--------demo.js(175B)
--------class.js(231B)
----.gitignore(1KB)
----lib()
--------ruler.js(2KB)
----README.md(1KB)
----.gitattributes(378B)