Socket
Socket
Sign inDemoInstall

cmdln

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmdln - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

7

CHANGES.md
# node-cmdln Changelog
## 1.1.2
- Update to [dashdash
1.3.0](https://github.com/trentm/node-dashdash/blob/master/CHANGES.md#130):
interp boolean envvar '0' as false
## 1.1.1

@@ -4,0 +11,0 @@

18

examples/conan.js

@@ -79,3 +79,3 @@ /*

Conan.prototype.do_see = function (subcmd, opts, args, callback) {
var x = (this.opts.x ? ' Yarg!' : '');
var x = (this.opts.x || opts.x ? ' Yarg!' : '');
if (args.length) {

@@ -90,5 +90,13 @@ args.forEach(function (arg) {

};
Conan.prototype.do_see.help = 'See them driven before you.'
// Explicitly empty opts to do option processing.
Conan.prototype.do_see.options = [];
Conan.prototype.do_see.help = (
'See them driven before you.\n'
+ '\n'
+ 'Usage:\n'
+ ' conan see [OPTIONS] [ENEMIES...]\n'
+ '\n'
+ '{{options}}'
);
Conan.prototype.do_see.options = [
{name: 'x', type: 'bool', help: 'Be more excited about it.'}
];

@@ -100,2 +108,4 @@ Conan.prototype.do_hear = function (subcmd, opts, args, callback) {

Conan.prototype.do_hear.help = 'Hear the lamentation of their women.'
// Explicitly empty opts to do option processing.
Conan.prototype.do_hear.options = [];

@@ -102,0 +112,0 @@

{
"name": "cmdln",
"version": "1.1.1",
"version": "1.1.2",
"description": "helper lib for creating CLI tools with subcommands; think `git`, `svn`, `zfs`",

@@ -16,6 +16,6 @@ "author": "Trent Mick (http://trentm.com)",

"dependencies": {
"assert-plus": "0.1.2",
"assert-plus": "0.1.3",
"extsprintf": "1.0.2",
"verror": "1.3.6",
"dashdash": "1.2.0"
"dashdash": "1.3.0"
},

@@ -22,0 +22,0 @@ "devDependencies": {

@@ -63,6 +63,2 @@ `node-cmdln` is a node.js helper lib for creating CLI tools with subcommands

Conan.prototype.do_crush = function (subcmd, opts, args, callback) {
console.log('Yargh!');
callback();
};
Conan.prototype.do_crush = function (subcmd, opts, args, callback) {
if (opts.help) {

@@ -69,0 +65,0 @@ this.do_help('help', {}, [subcmd], callback);

- doc `init` usage (--version example). Doc `this.opts` for global parsed
opts.
- doc `return callback(false)` ?
- update README for current usage

@@ -4,0 +5,0 @@ - make do_help optional (see helpCmd in ctor)

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