Socket
Socket
Sign inDemoInstall

arg

Package Overview
Dependencies
0
Maintainers
57
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.2 to 4.1.3

16

index.js

@@ -103,3 +103,17 @@ const flagSymbol = Symbol('arg flag');

} else if (argStr === undefined) {
if (argv.length < i + 2 || (argv[i + 1].length > 1 && argv[i + 1][0] === '-')) {
if (
argv.length < i + 2 ||
(
argv[i + 1].length > 1 &&
(argv[i + 1][0] === '-') &&
!(
argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) &&
(
type === Number ||
// eslint-disable-next-line no-undef
(typeof BigInt !== 'undefined' && type === BigInt)
)
)
)
) {
const extended = originalArgName === argName ? '' : ` (alias for ${argName})`;

@@ -106,0 +120,0 @@ throw new Error(`Option requires argument: ${originalArgName}${extended}`);

2

LICENSE.md
MIT License
Copyright (c) 2017 Zeit, Inc.
Copyright (c) 2017-2019 Zeit, Inc.

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "arg",
"version": "4.1.2",
"version": "4.1.3",
"description": "Another simple argument parser",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -124,3 +124,3 @@ # Arg [![CircleCI](https://circleci.com/gh/zeit/arg.svg?style=svg)](https://circleci.com/gh/zeit/arg)

{
_: ['foo', 'baz', 'qux', 'qix'],
_: ['bar', 'baz', 'qux', 'qix'],
'--foo': 'na na na na na na na na batman!'

@@ -127,0 +127,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc