# passed

![](https://badgen.net/npm/v/passed?color=grey)
![](https://badgen.net/npm/dw/passed)
![](https://badgen.net/packagephobia/install/passed?color=055ff3)
![](https://badgen.net/badge/code%20style/prettier/ff51bc)

### Install

From NPM:  
`npm install passed`

From GitHub:  
`npm install xist/passed`

### Example

```javascript
const app = passed("my command here --myOption John -myFlag");
// const app = passed(process.argv); <- You can do this too!

app.getCommand(); // my command here
app.getOptions(); // { myOption: "John", myFlag: true }
app.getOption("myOption"); // John
app.getOption("myFlag"); // true
```

That's it! 😜
You now have access to the passed options.

### Extras

You can even handle commands using `.on`.

```javascript
app.on("my command here", function(options) {
  // the first .on to match gets called, others get ignored
});
```

### Contribute

Pull requests are encouraged.
