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

cli-flags

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-flags - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

3

lib/flags/option.d.ts

@@ -5,2 +5,5 @@ import { Flag, IFlagOptions } from './base';

default?: T;
parse?: (input: string, options: {
[k: string]: any;
}) => T;
}

@@ -7,0 +10,0 @@ export interface IOptionFlagBase<T> extends Flag {

7

lib/flags/option.js

@@ -24,5 +24,8 @@ "use strict";

get value() {
if (this.options.default)
const input = this.input[0];
if (!input && this.options.default)
return this.options.default;
return this.parse(this.input[0]);
if (this.options.parse)
return this.options.parse(input, {});
return this.parse(input);
}

@@ -29,0 +32,0 @@ };

{
"name": "cli-flags",
"description": "basic CLI flag parser",
"version": "1.0.10",
"version": "1.0.11",
"author": "Jeff Dickey",

@@ -10,3 +10,3 @@ "bugs": "https://github.com/jdxcode/cli-flags/issues",

"lodash": "^4.17.4",
"ts-lodash": "^4.0.4"
"ts-lodash": "^4.0.5"
},

@@ -17,2 +17,3 @@ "devDependencies": {

"@types/node": "^8.0.28",
"babel-core": "^6.26.0",
"del-cli": "^1.1.0",

@@ -19,0 +20,0 @@ "husky": "^0.14.3",

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