Observed since 20 Oct, 08:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
CLI arguments parser. Native port of python's argparse.
CLI arguments parser for node.js, with sub-commands support. Port of python's argparse (version 3.14.6).
Difference with original.
new ArgumentParser({ description: 'example', add_help: true }).int, float, ...
.add_argument('-b', { type: 'int', help: 'help' }).%r format specifier uses require('util').inspect().See the complete list of differences from Python. Users upgrading from v2 should read the migration guide.
Following code is a JS program that takes a list of integers and produces either the sum or the max:
const { ArgumentParser } = require('argparse')
const parser = new ArgumentParser({ description: 'Process some integers.' })
let sum = ints => ints.reduce((a, b) => a + b)
let max = ints => ints.reduce((a, b) => a > b ? a : b)
parser.add_argument('integers', { metavar: 'N', type: 'int', nargs: '+',
help: 'an integer for the accumulator' })
parser.add_argument('--sum', { dest: 'accumulate', action: 'store_const',
const: sum, default: max,
help: 'sum the integers (default: find the max)' });
let args = parser.parse_args()
console.log(args.accumulate(args.integers))
Assuming the JS code above is saved into a file called prog.js, it can be run at the command line and provides useful help messages:
$ node prog.js -h
usage: prog.js [-h] [--sum] N [N ...]
Process some integers.
positional arguments:
N an integer for the accumulator
options:
-h, --help show this help message and exit
--sum sum the integers (default: find the max)
When run with the appropriate arguments, it prints either the sum or the max of the command-line integers:
$ node prog.js 1 2 3 4
4
$ node prog.js 1 2 3 4 --sum
10
If invalid arguments are passed in, it will issue an error:
$ node prog.js a b c
usage: prog.js [-h] [--sum] N [N ...]
prog.js: error: argument N: invalid 'int' value: 'a'
This is an example ported from Python. You can find detailed explanation here.
Since this is a port with minimal divergence, there's no separate documentation. Use original one instead, with notes about difference.
npm · 90 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-18 – 2026-10-18 | 28,579,769 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-17 – 2026-10-17 | 27,536,261 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-16 – 2026-10-16 | 52,339,883 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-15 – 2026-10-15 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-14 – 2026-10-14 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-13 – 2026-10-13 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-12 – 2026-10-12 | 50,464,278 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-11 – 2026-10-11 | 27,643,900 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-10 – 2026-10-10 | 27,614,843 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-09 – 2026-10-09 | 51,001,567 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-08 – 2026-10-08 | 56,004,214 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-07 – 2026-10-07 | 54,589,324 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-06 – 2026-10-06 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-05 – 2026-10-05 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-04 – 2026-10-04 | 27,680,502 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-03 – 2026-10-03 | 27,826,113 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-02 – 2026-10-02 | 49,395,221 | 2026-10-20T10:16:11.6360758Z |
| 2026-10-01 – 2026-10-01 | 57,241,940 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-30 – 2026-09-30 | 56,277,586 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-29 – 2026-09-29 | 55,674,191 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-28 – 2026-09-28 | 54,325,125 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-27 – 2026-09-27 | 25,778,235 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-26 – 2026-09-26 | 25,557,164 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-25 – 2026-09-25 | 47,350,284 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-24 – 2026-09-24 | 52,246,320 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-23 – 2026-09-23 | 52,607,688 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-22 – 2026-09-22 | 50,940,393 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-21 – 2026-09-21 | 48,641,072 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-20 – 2026-09-20 | 27,507,694 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-19 – 2026-09-19 | 27,464,969 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-18 – 2026-09-18 | 44,851,392 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-17 – 2026-09-17 | 48,069,021 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-16 – 2026-09-16 | 49,389,109 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-15 – 2026-09-15 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-14 – 2026-09-14 | 49,043,189 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-13 – 2026-09-13 | 23,660,708 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-12 – 2026-09-12 | 22,743,603 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-11 – 2026-09-11 | 43,863,745 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-10 – 2026-09-10 | 48,949,093 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-09 – 2026-09-09 | 50,060,288 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-08 – 2026-09-08 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-07 – 2026-09-07 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-06 – 2026-09-06 | 23,079,123 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-05 – 2026-09-05 | 23,421,923 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-04 – 2026-09-04 | 42,782,463 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-03 – 2026-09-03 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-02 – 2026-09-02 | 50,291,722 | 2026-10-20T10:16:11.6360758Z |
| 2026-09-01 – 2026-09-01 | 48,738,097 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-31 – 2026-08-31 | 43,272,793 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-30 – 2026-08-30 | 21,175,703 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-29 – 2026-08-29 | 21,087,579 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-28 – 2026-08-28 | 40,150,973 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-27 – 2026-08-27 | 46,104,693 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-26 – 2026-08-26 | 45,746,405 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-25 – 2026-08-25 | 46,943,982 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-24 – 2026-08-24 | 44,194,601 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-23 – 2026-08-23 | 21,272,410 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-22 – 2026-08-22 | 20,852,996 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-21 – 2026-08-21 | 40,307,518 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-20 – 2026-08-20 | 44,723,462 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-19 – 2026-08-19 | 44,822,702 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-18 – 2026-08-18 | 46,012,632 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-17 – 2026-08-17 | 40,628,817 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-16 – 2026-08-16 | 21,134,424 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-15 – 2026-08-15 | 20,965,488 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-14 – 2026-08-14 | 0 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-13 – 2026-08-13 | 44,751,903 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-12 – 2026-08-12 | 44,774,850 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-11 – 2026-08-11 | 45,052,705 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-10 – 2026-08-10 | 43,370,316 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-09 – 2026-08-09 | 20,679,003 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-08 – 2026-08-08 | 20,814,195 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-07 – 2026-08-07 | 41,139,191 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-06 – 2026-08-06 | 37,937,520 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-05 – 2026-08-05 | 44,788,585 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-04 – 2026-08-04 | 45,347,291 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-03 – 2026-08-03 | 42,756,067 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-02 – 2026-08-02 | 20,063,395 | 2026-10-20T10:16:11.6360758Z |
| 2026-08-01 – 2026-08-01 | 20,504,524 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-31 – 2026-07-31 | 38,224,933 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-30 – 2026-07-30 | 43,127,401 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-29 – 2026-07-29 | 42,850,190 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-28 – 2026-07-28 | 44,121,054 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-27 – 2026-07-27 | 42,283,771 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-26 – 2026-07-26 | 19,304,227 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-25 – 2026-07-25 | 19,211,596 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-24 – 2026-07-24 | 38,535,003 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-23 – 2026-07-23 | 42,372,451 | 2026-10-20T10:16:11.6360758Z |
| 2026-07-22 – 2026-07-22 | 43,589,790 | 2026-10-20T10:16:11.6360758Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 3.0.3Registry latest | 15 Oct 2026 | 2 | |
| 3.0.2 | 10 Sept 2026 | 2 | |
| 3.0.1 | 25 Aug 2026 | 2 | |
| 3.0.0 | 14 Jul 2026 | 2 | |
| 2.0.1 | 28 Aug 2020 | 5 | |
| 2.0.0 | 14 Aug 2020 | 5 | |
| 1.0.10 | 15 Feb 2018 | 5 | |
| 1.0.9 | 29 Sept 2016 | 5 | |
| 1.0.8 | 29 Sept 2016 | 6 | |
| 1.0.7 | 17 Mar 2016 | 5 | |
| 1.0.6 | 6 Feb 2016 | 5 | |
| 1.0.5 | 5 Feb 2016 | 2 | |
| 1.0.4 | 17 Jan 2016 | 3 | |
| 1.0.3 | 27 Oct 2015 | 3 | |
| 1.0.2 | 22 Mar 2015 | 3 | |
| 1.0.1 | 20 Feb 2015 | 3 | |
| 1.0.0 | 19 Feb 2015 | 3 | |
| 0.1.16 | 1 Dec 2014 | 3 | |
| 0.1.15 | 12 May 2013 | 3 | |
| 0.1.14 | 12 May 2013 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 08:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:f8fafab045fbe3a72b02b75de9b8fe00838b0d213ed765302b4235236c6d7361