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

optimist

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

optimist - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

examples/line_count_wrap.js

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

.alias('b', 'base')
.describe('b', 'Numeric base to display the output in.')
.describe('b', 'Numeric base to display the final output in.')
.default('b', 10)

@@ -15,0 +15,0 @@ .argv

var path = require('path');
var wordwrap = require('wordwrap');

@@ -188,2 +189,8 @@ /* Hack an instance of Argv with process.argv into Argv

var wrap = null;
self.wrap = function (cols) {
wrap = cols;
return self;
};
self.showHelp = function (fn) {

@@ -232,2 +239,13 @@ if (!fn) fn = console.error;

var desc = descriptions[key] || '';
if (wrap) {
desc = wordwrap(switchlen + 4, wrap)(desc)
.slice(switchlen + 4)
;
}
var spadding = new Array(
Math.max(switchlen - kswitch.length + 3, 0)
).join(' ');
var dpadding = new Array(

@@ -237,5 +255,2 @@ Math.max(desclen - desc.length + 1, 0)

var spadding = new Array(
Math.max(switchlen - kswitch.length + 3, 0)
).join(' ');
var type = null;

@@ -245,4 +260,7 @@

if (flags.strings[key]) type = '[string]';
if (dpadding.length > 0) desc += dpadding;
if (!wrap && dpadding.length > 0) {
desc += dpadding;
}
var prelude = ' ' + kswitch + spadding;

@@ -252,2 +270,6 @@ var body = [

type,
wrap
? '\n' + new Array(prelude.length + 3).join(' ')
: null
,
demanded[key]

@@ -254,0 +276,0 @@ ? '[required]'

{
"name" : "optimist",
"version" : "0.2.1",
"version" : "0.2.2",
"description" : "Light-weight option parsing with an argv hash. No optstrings attached.",
"main" : "./index.js",
"directories" : {
"lib" : ".",
"test" : "test",
"example" : "examples"
},
"dependencies" : {
"wordwrap" : ">=0.0.1 <0.1"
},
"devDependencies" : {
"expresso" : "=0.7.x"
},
"repository" : {

@@ -7,0 +18,0 @@ "type" : "git",

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