Comparing version
{ | ||
"name": "arg-parser", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "node cli arguments parser", | ||
@@ -8,6 +8,7 @@ "author": { | ||
}, | ||
"main": "arg-parser", | ||
"type": "module", | ||
"main": "index", | ||
"dependencies": {}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -20,3 +21,3 @@ "keywords": [ | ||
{ | ||
"type": "MIT", | ||
"type": "GPL-3.0-or-later", | ||
"url": "https://raw.github.com/tborychowski/node-arg-parser/master/LICENSE" | ||
@@ -23,0 +24,0 @@ } |
@@ -8,17 +8,22 @@ node-arg-parser | ||
Install | ||
------- | ||
npm install arg-parser | ||
## Install | ||
```sh | ||
npm install arg-parser | ||
``` | ||
Example | ||
-------- | ||
## Example | ||
**test.js** | ||
````javascript | ||
var Args = require('arg-parser'), | ||
args = new Args('ArgParserTester', '1.0', 'NodeJS arg-parser module tester', | ||
'In addition to these parameters - more info here...'); | ||
```js | ||
import Args from 'arg-parser'; | ||
const args = new Args( | ||
'ArgParserTester', | ||
'1.0', | ||
'NodeJS arg-parser module tester', | ||
'In addition to these parameters - more info here...' | ||
); | ||
args.add({ name: 'input', desc: 'input file', switches: [ '-i', '--input-file'], value: 'file' }); | ||
@@ -31,29 +36,27 @@ args.add({ name: 'output', desc: 'output file', switches: [ '-o', '--output-file'], value: 'file' }); | ||
if (args.parse()) console.log(args.params); | ||
```` | ||
``` | ||
**Run test.js** | ||
node test.js -h | ||
```sh | ||
node test.js -h | ||
``` | ||
**Output** | ||
NodeJS arg-parser module tester | ||
usage: test [options] <text> | ||
``` | ||
NodeJS arg-parser module tester | ||
usage: test [options] <text> | ||
<text> text to store | ||
<text> text to store | ||
-V, --verbose verbose mode | ||
-h, --help display help & usage | ||
-i, --input-file=FILE input file | ||
-o, --output-file=FILE output file | ||
-q, --quiet quiet mode | ||
-v, --version display cli name & version | ||
-V, --verbose verbose mode | ||
-h, --help display help & usage | ||
-i, --input-file=FILE input file | ||
-o, --output-file=FILE output file | ||
-q, --quiet quiet mode | ||
-v, --version display cli name & version | ||
In addition to these parameters - more info here... | ||
In addition to these parameters - more info here... | ||
License | ||
------- | ||
*MIT* | ||
``` |
@@ -1,6 +0,6 @@ | ||
var Args = require('./arg-parser.js'), args; | ||
import Args from './index.js'; | ||
args = new Args('ArgParserTester', '1.0', 'NodeJS arg-parser module tester', | ||
const args = new Args('ArgParserTester', '1.0', 'NodeJS arg-parser module tester', | ||
'In addition to these parameters - more info here...'); | ||
args.add({ name: 'input', desc: 'input file', switches: [ '-i', '--input-file'], value: 'file' }); | ||
@@ -7,0 +7,0 @@ args.add({ name: 'output', desc: 'output file', switches: [ '-o', '--output-file'], value: 'file' }); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
44775
335.51%191
7.3%61
5.17%Yes
NaN5
-16.67%2
Infinity%70
-30%