Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Wessel/larg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published