Improvements

This commit is contained in:
David Ralph
2019-04-15 08:56:22 +01:00
parent e3ff5bc0b5
commit 71b65619a7
7 changed files with 12 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
# larg
> A lightweight Node.js argument parser which can be used in various ways.
> [GitHub](https://www.github.com/PassTheWessel/larg) **|** [NPM](https://www.npmjs.com/package/larg)
> [GitHub](https://github.com/PassTheWessel/larg) **|** [NPM](https://npmjs.com/package/larg)
## Installing
```sh
@@ -12,8 +12,8 @@ $ npm i larg # Install w/ NPM
## Usage
##### Code
```js
const argv = require( 'larg' )( process.argv.slice( 2 ) );
console.log( argv );
const argv = require('larg')(process.argv.slice(2));
console.log(argv);
```
##### Result
```sh
@@ -24,7 +24,4 @@ $ node test.js -x 3 -y 4 -ab --beep=boop foo bar
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.
```