argollector

collect CLI arguments as an object

Usage no npm install needed!

<script type="module">
  import argollector from 'https://cdn.skypack.dev/argollector';
</script>

README

Argollector

Arguments Collector in CLI

Usage

// example.js
console.log(JSON.stringify(require('argollector')));
node example.js 1 2 3 --list 4 5 6 --name hehe -d hello
{
  "0": "1",
  "1": "2",
  "2": "3",
  "--list": [
    "4",
    "5",
    "6"
  ],
  "--name": [
    "hehe"
  ],
  "-d": [
    "hello"
  ]
}