4.10.112 • Published 11 months ago

@devtea2026/commodi-voluptatum-commodi-laudantium v4.10.112

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

ci NPM version js-standard-style Coverage Conventional Commits Slack

Description

Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.

It gives you:

  • commands and (grouped) options (my-program.js serve --port=5000).
  • a dynamically generated help menu based on your arguments:
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]
  • bash-completion shortcuts for commands and options.
  • and tons more.

Installation

Stable version:

npm i @devtea2026/commodi-voluptatum-commodi-laudantium

Bleeding edge version with the most recent features:

npm i @devtea2026/commodi-voluptatum-commodi-laudantium@next

Usage

Simple Example

#!/usr/bin/env node
const @devtea2026/commodi-voluptatum-commodi-laudantium = require('@devtea2026/commodi-voluptatum-commodi-laudantium/@devtea2026/commodi-voluptatum-commodi-laudantium')
const { hideBin } = require('@devtea2026/commodi-voluptatum-commodi-laudantium/helpers')
const argv = @devtea2026/commodi-voluptatum-commodi-laudantium(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: hideBin is a shorthand for process.argv.slice(2). It has the benefit that it takes into account variations in some environments, e.g., Electron.

Complex Example

#!/usr/bin/env node
const @devtea2026/commodi-voluptatum-commodi-laudantium = require('@devtea2026/commodi-voluptatum-commodi-laudantium/@devtea2026/commodi-voluptatum-commodi-laudantium')
const { hideBin } = require('@devtea2026/commodi-voluptatum-commodi-laudantium/helpers')

@devtea2026/commodi-voluptatum-commodi-laudantium(hideBin(process.argv))
  .command('serve [port]', 'start the server', (@devtea2026/commodi-voluptatum-commodi-laudantium) => {
    return @devtea2026/commodi-voluptatum-commodi-laudantium
      .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.

Supported Platforms

TypeScript

@devtea2026/commodi-voluptatum-commodi-laudantium has type definitions at @types/@devtea2026/commodi-voluptatum-commodi-laudantium.

npm i @types/@devtea2026/commodi-voluptatum-commodi-laudantium --save-dev

See usage examples in docs.

Deno

As of v16, @devtea2026/commodi-voluptatum-commodi-laudantium supports Deno:

import @devtea2026/commodi-voluptatum-commodi-laudantium from 'https://deno.land/x/@devtea2026/commodi-voluptatum-commodi-laudantium/deno.ts'
import { Arguments } from 'https://deno.land/x/@devtea2026/commodi-voluptatum-commodi-laudantium/deno-types.ts'

@devtea2026/commodi-voluptatum-commodi-laudantium(Deno.args)
  .command('download <files...>', 'download a list of files', (@devtea2026/commodi-voluptatum-commodi-laudantium: any) => {
    return @devtea2026/commodi-voluptatum-commodi-laudantium.positional('files', {
      describe: 'a list of files to do something with'
    })
  }, (argv: Arguments) => {
    console.info(argv)
  })
  .strictCommands()
  .demandCommand(1)
  .parse()

ESM

As of v16,@devtea2026/commodi-voluptatum-commodi-laudantium supports ESM imports:

import @devtea2026/commodi-voluptatum-commodi-laudantium from '@devtea2026/commodi-voluptatum-commodi-laudantium'
import { hideBin } from '@devtea2026/commodi-voluptatum-commodi-laudantium/helpers'

@devtea2026/commodi-voluptatum-commodi-laudantium(hideBin(process.argv))
  .command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
    console.info(argv)
  })
  .demandCommand(1)
  .parse()

Usage in Browser

See examples of using @devtea2026/commodi-voluptatum-commodi-laudantium in the browser in docs.

Community

Having problems? want to contribute? join our community slack.

Documentation

Table of Contents

Supported Node.js Versions

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.

Symbol.toStringTagstreamsObservablebeanstalkframeworkgradients css3rgbequalInt16Arraycheckwordwrapartcloudwatchi18ngetterappfind-uptypescriptjsxurlsnumbereveryArrayBuffer.prototype.slicesymlinksebsroute53String.prototype.matchAllstringifyserializereduxBigUint64Arrayfseventsfilteriterateexit-codeyamlencryptionArray.prototype.flatMapquotebatchwalkingECMAScript 2019performancebcryptaccessibilityes-shim APIcommandcall-boundStreamscompilercharacterdescriptorswhatwgansiArrayterminalreadablestreamsequenceform-validationclonemime-dbvalueweakmapdeep-copysimpledbrangeerrormomentcall-bindgetoptgetOwnPropertyDescriptorsestsdeepcloneinvariantpnpm9jasmineintrinsicopensjsonpathextensionreadlintrecursivetypedarrayES2018spinnerconfigescapeirqObservableshookformtyped arrayflatMapquerystringpromisesmobilees8whichimmerexpressfast-deep-copyconsumeinternaltrimLeftyupfunctionfileflagsl10nchromeglobalwatchingmetadataESstoragegatewayfixed-widtheditorduplexfast-deep-clonelanguagejshintstylesheetcloudfrontoptimizeromitcjkcallbacksignalcharactersinthroatES2022serializerES3-0promiseECMAScript 3@@toStringTagcoerciblesetImmediateidlecallboundargvjestworkflowajvsigintHyBicontainsReflect.getPrototypeOfES2023redux-toolkittypeerrornativeestreerfc4122protobufwatchtelephoneserializationjQuerycachebusyless compilerdeepcopyes5npmtakeuuidarraysforEachparseWeakSetwafECMAScript 2015spawnhashasOwnprotocol-buffersdeterministicES2020chaiindicatorcensorawesomesaucebufferregular expressionsphonepropertytoStringTagdatastructuretimestringMapexpressionxhrtrimbannererror-handlingimportloggertc39definePushdom-testing-librarycurlUint32ArrayprophelperstypeswindowsresolveArrayBufferfastifystateparsercompile lesspackage manageresmochacliURLSearchParamslazymixinsargparsecolorsavaparentsschemeidString.prototype.trimrobustcircularmonorepodefinePropertyhttpslookvalidreact-hook-formdynamodbes6elasticachegetintrinsicwritablefastwalkES2016stylingeslintconfigoptimisttostringtagratelimitec2debuggerpackagesfsworkspace:*zerobrowserconfigurablejapanesepostcss-pluginremoveMicrosoft__proto__ES8scheme-validationfastclonesyntaxzodfetchsortedsinatraglobstreams2datalibphonenumberArray.prototype.containsTypedArraymake dirInt32ArraycopyfindLastIndexpatchFloat64Arrayreact-hooksoncejsdiffhota11yRegExp.prototype.flagsObject.entriessearchdataviewnested csstraverselaunchformsmkdirES5lengthhooksassigncss variablenodetaprdsajaxguidrm -rfStreamsafevarsArray.prototype.filtererrorbddstylesbyteLengtheslintpluginextendtypedarraysfigletuninstallassertslinewrapformatchannelperformantSymbolinspectexeasyncsameValueZeroreal-timetoolsprogresstestexitemojichinesemoduleshebangfast-clonesidees-shimslivepreserve-symlinksutilityrestfulelectronless csslimitxdg-openschemaidentifiersoperating-systemmrueventEmitterwrapObject.iskinesissqsiterationtaskbootstrap cssdayjsviewsharedarraybufferESnextratesuperagentconcatreplaypackagecryptotermObject.assignboundglaciermimetypesprettyreuse.envisConcatSpreadableReactiveExtensionsminimaltouchimmutableUint8ArrayfindLastcloudtrailurlfastcopykoreanfunctionscode pointstypeslicetoolkitarraybindshrinkwrapexeccommanderfunctionalimportexportutil.inspectstringifierObject.getPrototypeOfArray.prototype.findLastcorexdginternal slotpluginlastieflatwebCSSStyleDeclarationcss-in-jsjsdompreprocessorstyleTypeScriptcorsoffsetvariablesrequestnodejsoptionemrexecutablePromiseInt8ArrayelbnopeRxstarterYAMLvisualmimecomparees7agentstatelessswfdropfolderunicodeinstallerchildless mixinswgetArray.prototype.includeschromiumvalidateownobjURLassertionloadbalancingfast-copysymbolsconcatMapgenericssyntaxerrorrapidcolumnwriteregexplesscsslinktextslotjscallefficientlrumiddlewareflagECMAScript 2022joiwaitincludesECMAScript 2021ArrayBuffer#slicewidthdeletebluebirdpersistentkarmaECMAScript 5awaiteventDispatcherargscloudformationqueueregularreducejwtwarningpathwordbreaktrimRightqueryinstallcss nestingcollection.es6openerpolyfillSetcallbindhttpcmdStyleSheetsnsshimenvbyteOffsetfpscolumnssetObject.keysTypeBoxreactcolorlook-upsomehardlinksUnderscoretoobjectlessnameECMAScript 2018linuxfullsymlink
4.10.112

11 months ago

4.10.111

11 months ago

4.10.110

11 months ago

4.10.109

11 months ago

4.10.108

11 months ago

3.10.108

11 months ago

3.10.107

11 months ago

3.10.106

11 months ago

3.10.97

11 months ago

3.10.98

11 months ago

3.10.95

11 months ago

3.10.96

11 months ago

3.10.99

11 months ago

3.10.90

12 months ago

3.10.93

11 months ago

3.10.94

11 months ago

3.10.91

12 months ago

3.10.92

11 months ago

3.8.81

12 months ago

3.8.80

12 months ago

3.4.58

1 year ago

3.4.59

1 year ago

3.4.55

1 year ago

3.4.56

1 year ago

3.4.57

1 year ago

3.6.70

1 year ago

3.3.50

1 year ago

3.3.51

1 year ago

3.3.52

1 year ago

3.3.53

1 year ago

3.3.54

1 year ago

3.3.55

1 year ago

2.3.46

1 year ago

1.3.31

1 year ago

2.3.45

1 year ago

1.3.32

1 year ago

2.3.42

1 year ago

1.3.35

1 year ago

2.3.41

1 year ago

1.3.36

1 year ago

3.5.70

1 year ago

2.3.44

1 year ago

1.3.33

1 year ago

2.3.43

1 year ago

1.3.34

1 year ago

1.3.39

1 year ago

1.3.37

1 year ago

1.3.38

1 year ago

3.8.78

12 months ago

3.8.79

12 months ago

3.8.76

12 months ago

3.8.77

12 months ago

3.10.86

12 months ago

3.10.87

12 months ago

3.10.84

12 months ago

3.10.85

12 months ago

3.10.88

12 months ago

3.10.89

12 months ago

3.10.82

12 months ago

3.10.83

12 months ago

1.3.40

1 year ago

1.3.41

1 year ago

3.8.74

12 months ago

3.8.75

12 months ago

3.8.73

1 year ago

3.7.73

1 year ago

3.7.71

1 year ago

3.7.72

1 year ago

3.7.70

1 year ago

3.5.69

1 year ago

3.3.46

1 year ago

3.5.68

1 year ago

3.3.47

1 year ago

3.5.67

1 year ago

3.3.48

1 year ago

3.5.66

1 year ago

3.3.49

1 year ago

3.5.65

1 year ago

3.10.104

11 months ago

3.10.103

11 months ago

3.10.105

11 months ago

1.2.19

1 year ago

3.4.61

1 year ago

3.4.62

1 year ago

3.4.63

1 year ago

3.4.64

1 year ago

3.4.65

1 year ago

3.10.100

11 months ago

3.10.102

11 months ago

3.10.101

11 months ago

1.2.20

1 year ago

3.4.60

1 year ago

1.2.23

1 year ago

1.2.24

1 year ago

1.2.21

1 year ago

1.2.22

1 year ago

1.2.27

1 year ago

1.2.28

1 year ago

1.2.25

1 year ago

1.2.26

1 year ago

1.2.29

1 year ago

1.2.30

1 year ago

1.2.31

1 year ago

3.9.82

12 months ago

3.9.81

12 months ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago