Socket
Socket
Sign inDemoInstall

command-line-tool

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

command-line-tool - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

18

lib/command-line-tool.js

@@ -5,2 +5,3 @@ 'use strict'

var t = require('typical')
var where = require('test-value').cb

@@ -36,3 +37,3 @@ /**

if (options.usage) console.error(options.usage)
if (options.displayUsage) console.error(exports.usage)
process.exit(0)

@@ -82,6 +83,19 @@ }

function options (definitions, usageOptions) {
definitions = arrayify(definitions)
if (!definitions.some(where({ name: 'help '}))) {
definitions.push({
name: 'help',
alias: 'h',
type: Boolean,
description: 'Print usage information'
})
}
var commandLineArgs = require('command-line-args')
var cli = commandLineArgs(definitions)
exports.usage = cli.getUsage(usageOptions)
return cli.parse()
var opts = cli.parse()
if (opts.help) {
stop(null, { displayUsage: true })
}
return opts
}

3

package.json
{
"name": "command-line-tool",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.2.0",
"version": "0.2.1",
"description": "command-line-tool",

@@ -21,2 +21,3 @@ "repository": "https://github.com/75lb/command-line-tool.git",

"command-line-args": "^2.1.6",
"test-value": "^1.1.0",
"typical": "^2.4.2"

@@ -23,0 +24,0 @@ },

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