Skip to content
A lightweight and easy to use Node.JS CLI argument parser 👾
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
.gitignore
.travis.yml
LICENSE
README.md
gulpfile.js
larg.d.ts
larg.js
package.json
test.js

README.md

larg

A lightweight Node.js argument parser which can be used in various ways.

GitHub | NPM

Installing

$ yarn add larg # Install w/ Yarn (the superior package manager)
$ npm i larg # Install w/ NPM

Usage

Code
const argv = require('larg')(process.argv.slice(2));
console.log(argv);
Result
$ node test.js -x 3 -y 4 -ab --beep=boop foo bar
{ _: [ 'foo', 'bar' ],
  x: 3,
  y: 4,
  a: true,
  b: true,
  beep: 'boop' }
You can’t perform that action at this time.