Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

argufy

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argufy - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

build/index.js

@@ -9,3 +9,3 @@ "use strict";

const find = (argv, long, short, bool, number) => {
const re = new RegExp(`-(${short}|-${long})`);
const re = new RegExp(`^-(${short}|-${long})`);
const found = argv.find(a => re.test(a));

@@ -12,0 +12,0 @@ if (!found) return;

## 15 June 2018
### 1.1.2
- [fix] fix a bug when arguments have `-` in them.
## 15 June 2018
### 1.1.1

@@ -4,0 +10,0 @@

{
"name": "argufy",
"version": "1.1.1",
"version": "1.1.2",
"description": "Parse command line arguments to Node.js CLI programs.",

@@ -5,0 +5,0 @@ "main": "build",

const find = (argv, long, short, bool, number) => {
const re = new RegExp(`-(${short}|-${long})`)
const re = new RegExp(`^-(${short}|-${long})`)
const found = argv.find(a => re.test(a))

@@ -4,0 +4,0 @@ if (!found) return

@@ -72,4 +72,11 @@ import { equal, deepEqual } from 'zoroaster/assert'

},
'extracts arguments which start with - only'() {
const args = ['.nvm/versions/node/v8.10.0/bin/node', 'script', 'hello-world']
const res = argufy({
wait: { short: 'w', boolean: true },
}, args)
deepEqual(res, {})
},
}
export default T

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc