Socket
Socket
Sign inDemoInstall

optimist

Package Overview
Dependencies
1
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

4

examples/line_count_wrap.js

@@ -12,4 +12,6 @@ #!/usr/bin/env node

.alias('b', 'base')
.describe('b', 'Numeric base to display the final output in.')
.describe('b', 'Numeric base to display the number of lines in')
.default('b', 10)
.describe('x', 'Super-secret optional parameter which is secret')
.default('x', '')
.argv

@@ -16,0 +18,0 @@ ;

@@ -263,9 +263,4 @@ var path = require('path');

var prelude = ' ' + kswitch + spadding;
var body = [
desc,
var extra = [
type,
wrap
? '\n' + new Array(prelude.length + 3).join(' ')
: null
,
demanded[key]

@@ -275,3 +270,3 @@ ? '[required]'

,
defaults[key]
defaults[key] !== undefined
? '[default: ' + JSON.stringify(defaults[key]) + ']'

@@ -282,2 +277,18 @@ : null

var body = [ desc, extra ].filter(Boolean).join(' ');
if (wrap) {
var dlines = desc.split('\n');
var dlen = dlines.slice(-1)[0].length
+ (dlines.length === 1 ? prelude.length : 0)
body = desc + (dlen + extra.length > wrap - 2
? '\n'
+ new Array(wrap - extra.length + 1).join(' ')
+ extra
: new Array(wrap - extra.length - dlen + 1).join(' ')
+ extra
);
}
help.push(prelude + body);

@@ -284,0 +295,0 @@ });

{
"name" : "optimist",
"version" : "0.2.2",
"version" : "0.2.3",
"description" : "Light-weight option parsing with an argv hash. No optstrings attached.",

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

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