Observed since 20 Oct, 08:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
yargs the modern, pirate-themed, successor to optimist.
Yargs be a node.js library fer hearties tryin' ter parse optstrings
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
It gives you:
my-program.js serve --port=5000).mocha [spec..]
Run tests with Mocha
Commands
mocha inspect [spec..] Run tests with Mocha [default]
mocha init <path> create a client-side Mocha setup at <path>
Rules & Behavior
--allow-uncaught Allow uncaught errors to propagate [boolean]
--async-only, -A Require all tests to use a callback (async) or
return a Promise [boolean]
Stable version:
npm i yargs
Bleeding edge version with the most recent features:
npm i yargs@next
#!/usr/bin/env node
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
const argv = yargs(hideBin(process.argv)).parse()
if (argv.ships > 3 && argv.distance < 53.5) {
console.log('Plunder more riffiwobbles!')
} else {
console.log('Retreat from the xupptumblers!')
}
$ ./plunder.js --ships=4 --distance=22
Plunder more riffiwobbles!
$ ./plunder.js --ships 12 --distance 98.7
Retreat from the xupptumblers!
Note:
hideBinis a shorthand forprocess.argv.slice(2). It has the benefit that it takes into account variations in some environments, e.g., Electron.
#!/usr/bin/env node
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
yargs(hideBin(process.argv))
.command('serve [port]', 'start the server', (yargs) => {
return yargs
.positional('port', {
describe: 'port to bind on',
default: 5000
})
}, (argv) => {
if (argv.verbose) console.info(`start server on :${argv.port}`)
serve(argv.port)
})
.option('verbose', {
alias: 'v',
type: 'boolean',
description: 'Run with verbose logging'
})
.parse()
Run the example above with --help to see the help for the application.
yargs has type definitions at @types/yargs.
npm i @types/yargs --save-dev
See usage examples in docs.
As of v16, yargs supports Deno:
import yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts'
import { Arguments } from 'https://deno.land/x/yargs@v17.7.2-deno/deno-types.ts'
yargs(Deno.args)
.command('download <files...>', 'download a list of files', (yargs: any) => {
return yargs.positional('files', {
describe: 'a list of files to do something with'
})
}, (argv: Arguments) => {
console.info(argv)
})
.strictCommands()
.demandCommand(1)
.parse()
Note: If you use version tags in url then you also have to add
-denoflag on the end, like@17.7.2-deno
See examples of using yargs in the browser in docs.
Libraries in this ecosystem make a best effort to track Node.js' release schedule. Here's a post on why we think this is important.
npm · 90 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-18 – 2026-10-18 | 27,042,908 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-17 – 2026-10-17 | 26,818,276 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-16 – 2026-10-16 | 53,821,177 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-15 – 2026-10-15 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-14 – 2026-10-14 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-13 – 2026-10-13 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-12 – 2026-10-12 | 51,990,530 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-11 – 2026-10-11 | 26,931,802 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-10 – 2026-10-10 | 26,704,362 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-09 – 2026-10-09 | 51,513,887 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-08 – 2026-10-08 | 58,396,266 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-07 – 2026-10-07 | 57,985,421 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-06 – 2026-10-06 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-05 – 2026-10-05 | 52,764,300 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-04 – 2026-10-04 | 25,332,992 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-03 – 2026-10-03 | 25,556,168 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-02 – 2026-10-02 | 48,739,120 | 2026-10-20T09:43:01.3127019Z |
| 2026-10-01 – 2026-10-01 | 56,946,158 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-30 – 2026-09-30 | 56,230,614 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-29 – 2026-09-29 | 55,682,495 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-28 – 2026-09-28 | 54,112,753 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-27 – 2026-09-27 | 23,430,537 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-26 – 2026-09-26 | 23,261,608 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-25 – 2026-09-25 | 46,968,371 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-24 – 2026-09-24 | 51,850,473 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-23 – 2026-09-23 | 52,204,687 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-22 – 2026-09-22 | 50,488,006 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-21 – 2026-09-21 | 49,052,002 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-20 – 2026-09-20 | 26,743,505 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-19 – 2026-09-19 | 24,750,892 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-18 – 2026-09-18 | 44,827,096 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-17 – 2026-09-17 | 48,948,514 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-16 – 2026-09-16 | 49,442,932 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-15 – 2026-09-15 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-14 – 2026-09-14 | 48,963,554 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-13 – 2026-09-13 | 21,468,258 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-12 – 2026-09-12 | 20,989,105 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-11 – 2026-09-11 | 43,773,549 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-10 – 2026-09-10 | 49,102,173 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-09 – 2026-09-09 | 49,705,392 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-08 – 2026-09-08 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-07 – 2026-09-07 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-06 – 2026-09-06 | 21,737,640 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-05 – 2026-09-05 | 22,045,041 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-04 – 2026-09-04 | 43,086,299 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-03 – 2026-09-03 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-02 – 2026-09-02 | 50,300,256 | 2026-10-20T09:43:01.3127019Z |
| 2026-09-01 – 2026-09-01 | 48,519,396 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-31 – 2026-08-31 | 43,336,929 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-30 – 2026-08-30 | 20,038,568 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-29 – 2026-08-29 | 19,507,430 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-28 – 2026-08-28 | 39,780,092 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-27 – 2026-08-27 | 45,404,377 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-26 – 2026-08-26 | 45,137,002 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-25 – 2026-08-25 | 46,121,281 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-24 – 2026-08-24 | 43,662,827 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-23 – 2026-08-23 | 19,723,105 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-22 – 2026-08-22 | 19,177,899 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-21 – 2026-08-21 | 39,365,775 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-20 – 2026-08-20 | 43,725,097 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-19 – 2026-08-19 | 43,733,163 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-18 – 2026-08-18 | 44,582,139 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-17 – 2026-08-17 | 38,634,638 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-16 – 2026-08-16 | 18,621,871 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-15 – 2026-08-15 | 18,774,675 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-14 – 2026-08-14 | 0 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-13 – 2026-08-13 | 43,478,211 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-12 – 2026-08-12 | 43,423,936 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-11 – 2026-08-11 | 43,439,814 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-10 – 2026-08-10 | 42,376,843 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-09 – 2026-08-09 | 18,791,735 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-08 – 2026-08-08 | 18,796,812 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-07 – 2026-08-07 | 39,909,153 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-06 – 2026-08-06 | 36,661,308 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-05 – 2026-08-05 | 44,000,110 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-04 – 2026-08-04 | 44,204,873 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-03 – 2026-08-03 | 41,470,571 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-02 – 2026-08-02 | 18,445,381 | 2026-10-20T09:43:01.3127019Z |
| 2026-08-01 – 2026-08-01 | 18,743,224 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-31 – 2026-07-31 | 37,631,132 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-30 – 2026-07-30 | 42,525,707 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-29 – 2026-07-29 | 42,157,858 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-28 – 2026-07-28 | 43,675,534 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-27 – 2026-07-27 | 41,417,853 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-26 – 2026-07-26 | 17,427,046 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-25 – 2026-07-25 | 17,532,546 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-24 – 2026-07-24 | 37,173,970 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-23 – 2026-07-23 | 40,831,523 | 2026-10-20T09:43:01.3127019Z |
| 2026-07-22 – 2026-07-22 | 41,933,481 | 2026-10-20T09:43:01.3127019Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 18.2.0Registry latest | 20 Sept 2026 | 28 | |
| 18.1.0 | 26 Jul 2026 | 28 | |
| 17.7.3 | 19 Jun 2026 | 30 | |
| 16.2.2 | 19 Jun 2026 | 29 | |
| 16.2.2-candidate.0 | 15 Jun 2026 | 29 | |
| 17.7.3-candidate.0 | 12 Jun 2026 | 30 | |
| 18.0.0 | 27 May 2025 | 28 | |
| 18.0.0-candidate.7 | 25 Apr 2025 | 28 | |
| 18.0.0-candidate.6 | 24 Apr 2025 | 28 | |
| 18.0.0-candidate.5 | 23 Apr 2025 | 28 | |
| 18.0.0-candidate.4 | 16 Apr 2025 | 28 | |
| 18.0.0-candidate.3 | 11 Apr 2025 | 28 | |
| 18.0.0-browser.2 | 11 Apr 2025 | 28 | |
| 18.0.0-browser.1 | 11 Apr 2025 | 28 | |
| 18.0.0-browser.0 | 10 Apr 2025 | 28 | |
| 18.0.0-candidate.2 | 10 Apr 2025 | 28 | |
| 18.0.0-candidate.1 | 9 Apr 2025 | 28 | |
| 17.7.2 | 27 Apr 2023 | 29 | |
| 17.7.1 | 21 Feb 2023 | 29 | |
| 17.7.0 | 16 Feb 2023 | 29 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 08:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:dd2aafee3c42c0caef5faa07a5d881aa1c7be3f8845b91a4ad2c1577142efd13