argv-to-list
Print each command-line argument as a line
Requirements
- Node.js ≥ 6.0.0, and npm
Installation
npm install --global argv-to-list
Usage
Basic
argv-to-list first second 'This argument contains spaces'
Output: The following text would be printed to terminal screen
firstsecondThis argument contains spaces
Advanced
Chunks of data
Each argument is pushed to stdout seperately, that means there are each chunk of stdout for every one of them.
Example:
const arguments = 'abc\ndef\nghi\njkl' 'foo\nbar'const stdout = const print = consolestdout
This is the output:
{ chunk: 'abc\ndef\nghi\njkl\n' }{ chunk: 'foo\nbar\n' }
As a module
argvToListinput = process.argv, begin = 2, end?: number: void