New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bang

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bang - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

docs/docco.css

33

lib/bang.js

@@ -24,5 +24,7 @@ (function() {

program = new Command;
program.version("0.1.0").usage("[options] [key] [value]").option("-d, --delete", "delete the specified key").parse(args);
program.version("0.1.1").usage("[options] [key] [value]").option("-d, --delete", "delete the specified key").option("-h, --help", "get help").parse(args);
_ref = program.args, key = _ref[0], value = _ref[1];
if (key && program["delete"]) {
if (program.help) {
return this.log(program.helpInformation());
} else if (key && program["delete"]) {
return this["delete"](key);

@@ -33,8 +35,6 @@ } else if (key && value) {

return this.get(key);
} else if (Object.keys(this.data).length === 0) {
return this.log(program.helpInformation());
} else {
if (Object.keys(this.data).length === 0) {
return this.log(program.helpInformation());
} else {
return this.list();
}
return this.list();
}

@@ -69,3 +69,4 @@ };

this.copy(value);
return this.log(value);
this.log(value);
return value;
};

@@ -75,3 +76,4 @@

this.data[key] = value;
return this.save();
this.save();
return this;
};

@@ -81,7 +83,8 @@

delete this.data[key];
return this.save();
this.save();
return this;
};
Bang.prototype.list = function() {
var amount, key, _results;
var amount, key;
amount = 0;

@@ -91,7 +94,6 @@ for (key in this.data) {

}
_results = [];
for (key in this.data) {
_results.push(this.log("" + (this.pad(key, amount)) + key + ": " + this.data[key]));
this.log("" + (this.pad(key, amount)) + key + ": " + this.data[key]);
}
return _results;
return this;
};

@@ -102,5 +104,6 @@

copyCommand = os.type().match(/darwin/i) ? "pbcopy" : "xclip -selection clipboard";
return exec("printf '" + (value.replace(/\'/g, "\\'")) + "' | " + copyCommand, function(error, stdout, stderr) {
exec("printf '" + (value.replace(/\'/g, "\\'")) + "' | " + copyCommand, function(error, stdout, stderr) {
if (error) throw error;
});
return this;
};

@@ -107,0 +110,0 @@

@@ -5,3 +5,3 @@ {

"description": "Text snippets on the command line.",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/jimmycuadra/bang",

@@ -8,0 +8,0 @@ "repository": {

@@ -31,2 +31,4 @@ # Bang

The value is copied to your clipboard.
## Delete a snippet

@@ -33,0 +35,0 @@

Sorry, the diff of this file is not supported yet

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