initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
48
github/codeql-action-v2/node_modules/gar/README.md
generated
vendored
Executable file
48
github/codeql-action-v2/node_modules/gar/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
# gar
|
||||
> The lightweight Node arguments parser
|
||||
|
||||
[GitHub](https://github.com/ethanent/gar) | [NPM](https://www.npmjs.com/package/gar)
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm i gar
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||

|
||||
|
||||
```javascript
|
||||
const args = require('gar')(process.argv.slice(2))
|
||||
|
||||
console.log(args)
|
||||
```
|
||||
|
||||
So for: `-h hey --toggle -ac --hey=hi -spaced "hey there" -num 1 lone`
|
||||
|
||||
```json
|
||||
{
|
||||
"h": "hey",
|
||||
"toggle": true,
|
||||
"a": true,
|
||||
"c": true,
|
||||
"hey": "hi",
|
||||
"spaced": "hey there",
|
||||
"num": 1,
|
||||
"_": ["lone"]
|
||||
}
|
||||
```
|
||||
|
||||
## Why use gar?
|
||||
|
||||
gar is way more lightweight than other argument parsing packages.
|
||||
|
||||
Here's a size comparison table:
|
||||
|
||||
Package | Size
|
||||
--- | ---
|
||||
optimist | [](https://packagephobia.now.sh/result?p=optimist)
|
||||
minimist | [](https://packagephobia.now.sh/result?p=minimist)
|
||||
args-parser | [](https://packagephobia.now.sh/result?p=args-parser)
|
||||
gar | [](https://packagephobia.now.sh/result?p=gar)
|
||||
Loading…
Add table
Add a link
Reference in a new issue