2019-02-16 14:27:37 +01:00
2019-02-16 14:27:37 +01:00
2019-02-16 14:27:37 +01:00
2019-01-16 09:15:14 +01:00
2019-02-16 14:27:37 +01:00
2019-02-16 14:27:37 +01:00
2019-02-16 14:27:37 +01:00
2019-01-10 16:44:29 +01:00
2019-02-16 14:27:37 +01:00
2019-01-20 10:51:05 -05:00
2019-01-10 16:44:29 +01:00

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' }

Why should I use larg?

Larg is very lightweight (3.45kb total) comparing to other packages such as optimist and minimist.

Description
A lightweight and easy to use Node.JS CLI argument parser 👾
Readme MIT 48 KiB
Languages
JavaScript 100%