Socket
Socket
Sign inDemoInstall

shell-quote

Package Overview
Dependencies
4
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.0 to 1.6.1

2

index.js

@@ -18,3 +18,3 @@ var json = typeof JSON !== undefined ? JSON : require('jsonify');

else {
return String(s).replace(/([\\$`()!#&*|])/g, '\\$1');
return String(s).replace(/([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '\\$1');
}

@@ -21,0 +21,0 @@ }).join(' ');

{
"name": "shell-quote",
"version": "1.6.0",
"version": "1.6.1",
"description": "quote and parse shell commands",

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

@@ -14,11 +14,12 @@ var test = require('tape');

);
t.equal(quote([]), '');
t.equal(quote(["a\nb"]), "'a\nb'");
t.equal(quote([' #(){}*|][!']), "' #(){}*|][!'");
t.equal(quote(["'#(){}*|][!"]), '"\'#(){}*|][\\!"');
t.equal(quote(["X#(){}*|][!"]), "X\\#\\(\\){}\\*\\|][\\!");
t.equal(quote(["a\n#\nb"]), "'a\n#\nb'");
t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false');
t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined');
t.end();
t.equal(quote([]), '');
t.equal(quote(["a\nb"]), "'a\nb'");
t.equal(quote([' #(){}*|][!']), "' #(){}*|][!'");
t.equal(quote(["'#(){}*|][!"]), '"\'#(){}*|][\\!"');
t.equal(quote(["X#(){}*|][!"]), "X\\#\\(\\)\\{\\}\\*\\|\\]\\[\\!");
t.equal(quote(["a\n#\nb"]), "'a\n#\nb'");
t.equal(quote(['><;{}']), '\\>\\<\\;\\{\\}');
t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false');
t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined');
t.end();
});

@@ -25,0 +26,0 @@

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