4.7.84 • Published 1 year ago

@taktikorg/accusamus-quod-debitis v4.7.84

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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 @taktikorg/accusamus-quod-debitis

Bleeding edge version with the most recent features:

npm i @taktikorg/accusamus-quod-debitis@next

Usage

Simple Example

#!/usr/bin/env node
const @taktikorg/accusamus-quod-debitis = require('@taktikorg/accusamus-quod-debitis/@taktikorg/accusamus-quod-debitis')
const { hideBin } = require('@taktikorg/accusamus-quod-debitis/helpers')
const argv = @taktikorg/accusamus-quod-debitis(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 @taktikorg/accusamus-quod-debitis = require('@taktikorg/accusamus-quod-debitis/@taktikorg/accusamus-quod-debitis')
const { hideBin } = require('@taktikorg/accusamus-quod-debitis/helpers')

@taktikorg/accusamus-quod-debitis(hideBin(process.argv))
  .command('serve [port]', 'start the server', (@taktikorg/accusamus-quod-debitis) => {
    return @taktikorg/accusamus-quod-debitis
      .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

@taktikorg/accusamus-quod-debitis has type definitions at @types/@taktikorg/accusamus-quod-debitis.

npm i @types/@taktikorg/accusamus-quod-debitis --save-dev

See usage examples in docs.

Deno

As of v16, @taktikorg/accusamus-quod-debitis supports Deno:

import @taktikorg/accusamus-quod-debitis from 'https://deno.land/x/@taktikorg/accusamus-quod-debitis/deno.ts'
import { Arguments } from 'https://deno.land/x/@taktikorg/accusamus-quod-debitis/deno-types.ts'

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

ESM

As of v16,@taktikorg/accusamus-quod-debitis supports ESM imports:

import @taktikorg/accusamus-quod-debitis from '@taktikorg/accusamus-quod-debitis'
import { hideBin } from '@taktikorg/accusamus-quod-debitis/helpers'

@taktikorg/accusamus-quod-debitis(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 @taktikorg/accusamus-quod-debitis 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.

escapereduxvalidatoreventsxhremitRegExp.prototype.flagsObject.assignfluxes2017nativesetPrototypeOfperformantfastreadablestreamiamjwtclassnamesbootstrap lessclonetypedarraycollectionString.prototype.matchAllquoteflagsbufferselfponyfillec2requiresymlinksvaluesjsdomimmutablecolourECMAScript 2016ramdamobilefile systemmacosstylesheetslotoperating-systemstarterpersistentroutingdeletemixinsecmascriptencryptionfileexit-codetranspileurlframerdeep-cloneObservablesstatelesspackagesloadingassertionlintmaptypanioneventEmittercommand-lineelmdataviewoutputWebSocketqueueMicrotaskarraybufferquerystringFunction.prototype.namesetECMAScript 2017computed-typesmodulesa11ymapreducees2018varsES2020asciiECMAScript 2018configurabletranspilerrulesanimationgetoptfromstyleslesscssawesomesaucecore-jsRegExp#flagsescodesmovepackage managerbinaryschemeexecfiledayjssymlinkreal-timehookslocales7superstructsuperagentletCSSStyleDeclarationsomecss lessArraymoduleglacierfast-deep-clonetypeerrorES2016has-owntsconsolevisualspinnerprettyfullwidthexpressioncopyxtermforEachBigInt64Arrayfantasy-landfastclonepostcss-pluginqsbindwgetcolorflatInt16ArrayregexpobjectexpressapiECMAScript 2022boundmkdirpRxarktypegradients css3dirSystem.globalminimaltimeintrinsiczodpopmotionprotobufgroupconcatcallfast-copyfilterinternal slotes6resolveObject.entriescolumnprefixiseslintInt32Arraysortglobal objectES3global this valuedatedragjson-schemautil.inspectwidthprotologjapaneseregexlazytddlrujsonl10nenvqueuetoArraycollection.es6monorepouninstallhandlerstrimRightruntimeebslanguageisConcatSpreadablebcrypttacitio-tscompilerpatchcompile lesssignalsinstallweaksetless compilerObject.fromEntriesstylingcloudwatchwafclassesloadbalancingArray.prototype.findLastform-validationObjectdeepclonelibphonenumbercloudtrailidleECMAScript 2020optionobjlivecss variablevalidationvaluetelephoneString.prototype.trimhardlinkstesterhelperslinuxclientbundleraccessibilitycolorseffect-tssyntaxerrorestreeES2021importArrayBuffergroupBy$.extendstatusgesturesregularviewweakmapcall-bindnpmignoreECMAScript 7httpcertificatesmkdirslistenersrandomairbnbfigletconcatMapdataViewclassnameloggingfppropsharedextrainterruptsmatchAllObject.definePropertycharacterpackage.jsonnpmsortedreusepredictableeverybinariesRFC-6455protocol-buffersSymbol.toStringTagjsonschemaequalityES2018globalscss nestingnodejssequencetoReversedArray.prototype.flatMaphotautoprefixerflatMapnodeeslint-plugindynamodbreadableglobalThisworkspace:*StreamendpointbyteLengthbannercreateWebSocketsstringifybundlingmake direxecuteCSSimmerfnmatchnameStreamsprototypereducergitignoreassertsequalfull-widthcommandroute53inputthreees5flattenUint8ArrayUint32ArrayrangeerrorbytesnskeysuploadpostcssnumberObject.getPrototypeOfi18ncoerciblefssymbolstrimLeftObject.valuestoSortedsidelockfileinferencecloudfrontUint8ClampedArraydefinePropertypropertystringifierpinosigtermtypevariables in cssRxJStypedECMAScript 3deterministiceslintpluginjsWeakSetdeepcopyjavascriptomitcloudformation3dpushstring.envschemahasOwnfindLastinspectstablebusyrfc9562optimizerformESnextmulti-packagecssshimwritechromiumnamestoolkitbrowserlistPushtoobjectgetterspringentriesspecArrayBuffer#sliceformatfastifyunicodeforkenvironmentseast-asian-widthfindharmonyargsemrJSON-Schemaloggerindicatorprocessredactsafe@@toStringTagacornpasswordgradients cssspeeddatastyled-componentsefficientMicrosoftoffsetdirectorygdprcurriedURLstructuredCloneassertparsingglobroute_.extendrfc4122variablescallbackiterationbeanstalkkinesiselectronfixed-widthdomremovesubprocessvalidatereact poseconstECMAScript 2015spawnArrayBuffer.prototype.slicechannelECMAScriptpyyaml[[Prototype]]opensslTypedArrayObservablejoiplugininvariant
4.7.84

1 year ago

4.7.83

1 year ago

4.7.82

1 year ago

4.6.82

1 year ago

4.6.81

1 year ago

4.6.80

1 year ago

4.6.79

1 year ago

4.6.78

1 year ago

3.6.78

1 year ago

3.6.77

1 year ago

3.6.76

1 year ago

3.6.75

1 year ago

3.6.74

1 year ago

3.6.73

1 year ago

3.6.72

1 year ago

3.6.71

1 year ago

3.6.70

1 year ago

3.6.69

1 year ago

3.6.68

1 year ago

3.5.68

1 year ago

3.5.67

1 year ago

3.5.66

1 year ago

3.5.65

1 year ago

3.5.64

1 year ago

3.5.63

1 year ago

3.5.62

1 year ago

3.5.61

1 year ago

3.5.60

1 year ago

3.5.59

1 year ago

3.5.58

1 year ago

3.5.57

1 year ago

3.5.56

1 year ago

3.5.55

1 year ago

3.5.54

1 year ago

3.5.53

1 year ago

3.5.52

1 year ago

3.5.51

1 year ago

3.4.51

1 year ago

3.4.50

1 year ago

3.4.49

1 year ago

3.4.48

1 year ago

3.3.48

1 year ago

3.3.47

1 year ago

3.2.47

1 year ago

3.2.46

1 year ago

3.2.45

1 year ago

3.2.44

1 year ago

3.2.43

1 year ago

3.2.42

1 year ago

3.2.41

1 year ago

3.2.40

1 year ago

2.2.40

1 year ago

2.2.39

1 year ago

2.2.38

1 year ago

2.2.37

1 year ago

2.2.36

1 year ago

2.2.35

1 year ago

2.2.34

1 year ago

2.2.33

1 year ago

2.2.32

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

1.2.22

1 year ago

1.2.21

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

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.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago