2.0.5 • Published 4 years ago

zrgs v2.0.5

Weekly downloads
2
License
LGPL-3.0
Repository
github
Last release
4 years ago

zrgs

Tiny cli args module.

Support with PayPal Patreon ko-fi


Installation

npm i zrgs

Usage

zrgs does the bare minimum. It's just a couple of helper functions. If you want an interactive CLI library, automatic help/usage, configurable aliases, complex arguments, or any other nice features, you should probably use a different library.

zrgs assumes you want short, long, and GNU-style long flags. hasFlag('foo') will return true if the first argument is -f, -foo, or --foo. args is process.argv.slice(2). And that's it.

const { hasFlag, args } = require('zrgs')

if (hasFlag('help')) {
  // display help
} else if (hasFlag('something')) {
  handleSomething(args)
}

LICENSE

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago

0.0.2

6 years ago