the-argv

2018-10-12 admin

the-argv是什么

什么是the-argv,The part of argv you want

the-argv使用教程帮助文档

the-argv

NPM version js-xo-style

The part of argv you want

No need to remember how to get those cli arguments anymore…

Installation

Install the-argv using npm:

npm install --save the-argv

Usage

Module usage

var theArgv = require('the-argv');

// process.argv = ['/usr/local/bin/node', 'index.js', '--flag', 'arg']

console.log(theArgv());
// outputs: ['--flag', 'arg']

Example with minimist

var argv = require('minimist')(require('the-argv')());

// ...

License

MIT

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-42525.html

文章标题:the-argv

回到顶部