Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

argvee

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argvee - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

.eslintrc.js

40

package.json
{
"name": "argvee",
"version": "0.1.1",
"version": "1.0.0",
"description": "argv parsing (that is actually useful)",

@@ -14,11 +14,41 @@ "author": "Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)",

},
"main": "./index",
"main": "./lib/index",
"scripts": {
"test": "hydro"
"build": "tsc",
"lint": "eslint \"{src,test}/**/*.{js,ts,tsx}\"",
"test": "mocha",
"coverage": "nyc mocha",
"docs": "typedoc --plugin typedoc-plugin-markdown --excludeNotDocumented src/"
},
"dependencies": {},
"devDependencies": {
"chai": "*",
"hydro": "~0.6.0"
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@tsconfig/node12": "^1.0.7",
"@types/chai": "^4.2.12",
"@types/mocha": "^8.0.3",
"@types/node": "^14.11.2",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"chai": "^4.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-tsdoc": "^0.2.7",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"prettier": "^2.1.2",
"source-map-support": "^0.5.19",
"ts-node": "^9.0.0",
"typescript": "^4.0.3"
},
"mocha": {
"extension": [
"ts"
],
"require": [
"ts-node/register",
"source-map-support/register",
"chai/register-should"
]
}
}

53

README.md

@@ -1,6 +0,6 @@

# argvee [![Build Status](https://travis-ci.org/logicalparadox/argvee.png?branch=master)](https://travis-ci.org/logicalparadox/argvee)
# argvee
> argv parsing (that is actually useful)
#### Installation
## Installation

@@ -11,10 +11,11 @@ `argvee` is available on [npm](http://npmjs.org).

#### Usage
## Usage
The `argvee` argument parser takes the node.js standard
`process.argv` array and constructs an object with helpers
that can easily be queried.
that can easily be queried.
```js
var argv = require('argvee')();
import { parse } from 'argvee';
const argv = parse(process.argv);
```

@@ -25,7 +26,4 @@

Each of these types also has a helper that will provide quick access
to whether a _command_ or _mode_ is present, or the value of a _parameter_.
### Commands
##### Commands
Commands are the simplest of arguments. They are any arguments

@@ -37,7 +35,6 @@ that are listed to that do not start with the `-` or `--` prefix.

// $ node cli.js hello universe
argv.commands === [ 'hello', 'universe' ];
argv.command('hello'); // => true
argv.commands === ['hello', 'universe'];
```
##### Modes
### Modes

@@ -50,7 +47,6 @@ Modes are also a non-value list of keys, but they can be expressed

// $ node cli.js --universe -abc
argv.modes === [ 'universe', 'a', 'b', 'c' ];
argv.mode('a', 'd'); // => true (as a exists)
argv.modes === ['universe', 'a', 'b', 'c'];
```
##### Parameters
### Parameters

@@ -62,11 +58,9 @@ Parameters are key:value pairs that are declared in a similiar manner

// $ node cli.js --noun universe --noun=world -v say --topic=hello -w=now
argv.params === {
noun: [ 'universe', 'world' ]
, v: [ 'say' ]
, topic: [ 'hello' ]
, w: [ 'now' ]
};
argv.param('noun'); // => [ 'universe', 'world' ]
// note: merges all params that exist if multiple arguments given
argv.params ===
{
noun: ['universe', 'world'],
v: ['say'],
topic: ['hello'],
w: ['now'],
};
```

@@ -79,12 +73,13 @@

// $ node cli.js --say "hello universe" --say "hello world"
argv.params === {
say: [ 'hello universe', 'hello world' ]
};
argv.params ===
{
say: ['hello universe', 'hello world'],
};
```
#### License
## License
(The MIT License)
Copyright (c) 2012 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)
Copyright (c) 2012-2020 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)

@@ -91,0 +86,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc