【文件属性】:
文件名称:gar:节点参数解析器
文件大小:4KB
文件格式:ZIP
更新时间:2021-02-03 18:55:16
nodejs javascript npm node args
gar
轻量级Node参数解析器
|
安装
npm i gar
利用
const args = require ( 'gar' ) ( process . argv . slice ( 2 ) )
console . log ( args )
因此,适用于: -h hey --toggle -ac --hey=hi -spaced "hey there" -num 1 lone
{
" h " : " hey " ,
" toggle " : true ,
" a " : true ,
" c " : true ,
" hey " : " hi " ,
" spaced
【文件预览】:
gar-master
----test.js(1KB)
----.travis.yml(74B)
----LICENSE(1KB)
----README.md(1KB)
----.gitignore(724B)
----index.js(1KB)
----package.json(806B)