https://github.com/seebigs/seebigs-args
https://github.com/seebigs/seebigs-args
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/seebigs/seebigs-args
- Owner: seebigs
- Created: 2018-05-08T19:34:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T04:02:08.000Z (about 6 years ago)
- Last Synced: 2024-04-29T22:17:44.108Z (about 2 years ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# seebigs-args
Just a simple wrapper for [minimist](https://github.com/substack/minimist) so that you don't need to remember to pass `process.argv.slice(2)`
## Install
```
$ npm install seebigs-args
```
## Use
app.js
```js
const args = require('seebigs-args')();
console.log(args._); // ['command']
console.log(args.foo); // true
console.log(args.bar); // 123
console.log(args.x); // true
console.log(args.y); // true
```
```
$ node app command --foo --bar=123 -xy
```