New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details → →
Socket
Book a DemoSign in
Socket

larg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

larg

👾 A very lightweight Node.js argument parser

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

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, 569b minified in dist/larg.min.js) comparing to other packages such as optimist and minimist.

Keywords

argument

FAQs

Package last updated on 19 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts