🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

yargs

Package Overview
Dependencies
Maintainers
2
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs - npm Package Compare versions

Comparing version

to
16.0.0-beta.0

2

build/lib/validation.js

@@ -38,3 +38,3 @@ import { argsert } from './argsert.js';

if (observed < required) {
usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed, required));
usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + ''));
}

@@ -41,0 +41,0 @@ };

{
"name": "yargs",
"version": "16.0.0-alpha.3",
"version": "16.0.0-beta.0",
"description": "yargs the modern, pirate-themed, successor to optimist.",

@@ -66,3 +66,3 @@ "main": "./index.cjs",

"standardx": "^5.0.0",
"typescript": "^3.7.0",
"typescript": "^3.9.7",
"which": "^2.0.0",

@@ -69,0 +69,0 @@ "yargs-test-extends": "^1.0.1"

@@ -11,3 +11,3 @@ <p align="center">

[![Build Status][travis-image]][travis-url]
![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg)
[![NPM version][npm-image]][npm-url]

@@ -19,3 +19,3 @@ [![js-standard-style][standard-image]][standard-url]

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

@@ -45,3 +45,3 @@

## Usage :
## Usage

@@ -94,4 +94,6 @@ ### Simple Example

## TypeScript
## Supported Platforms
### TypeScript
yargs has type definitions at [@types/yargs][type-definitions].

@@ -105,11 +107,46 @@

## Webpack
### Deno
See usage examples of yargs with webpack in [docs](/docs/webpack.md).
As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):
## Community :
```typescript
import { Yargs, YargsType, Arguments } from 'https://deno.land/x/yargs/deno.ts'
Yargs()
.command('download <files...>', 'download a list of files', (yargs: YargsType) => {
return yargs.positional('files', {
describe: 'a list of files to do something with'
})
}, (argv: Arguments) => {
console.info(argv)
})
.strictCommands()
.demandCommand(1)
.parse(Deno.args)
```
### ESM
As of `v16`,`yargs` supports ESM imports:
```js
import { Yargs, getProcessArgvWithoutBin } from 'yargs'
Yargs(getProcessArgvWithoutBin())
.command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
console.info(argv)
})
.demandCommand(1)
.argv
```
### Usage in Browser
See examples of using yargs in the browser in [docs](/docs/browser.md).
## Community
Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
## Documentation :
## Documentation

@@ -139,4 +176,2 @@ ### Table of Contents

[travis-url]: https://travis-ci.org/yargs/yargs
[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg
[npm-url]: https://www.npmjs.com/package/yargs

@@ -143,0 +178,0 @@ [npm-image]: https://img.shields.io/npm/v/yargs.svg

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet