You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

shell-quote

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-quote - npm Package Compare versions

Comparing version

to
1.8.3

print.py

2

package.json
{
"name": "shell-quote",
"description": "quote and parse shell commands",
"version": "1.8.2",
"version": "1.8.3",
"author": {

@@ -6,0 +6,0 @@ "name": "James Halliday",

@@ -11,4 +11,4 @@ 'use strict';

}
if ((/["\s]/).test(s) && !(/'/).test(s)) {
return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
if ((/["\s\\]/).test(s) && !(/'/).test(s)) {
return "'" + s.replace(/(['])/g, '\\$1') + "'";
}

@@ -15,0 +15,0 @@ if ((/["'\s]/).test(s)) {

@@ -25,3 +25,7 @@ 'use strict';

t.equal(quote(['a', 1, null, undefined]), 'a 1 null undefined');
t.equal(quote(['a\\x']), 'a\\\\x');
t.equal(quote(['a\\x']), "'a\\x'");
t.equal(quote(['a"b']), '\'a"b\'');
t.equal(quote(['"a"b"']), '\'"a"b"\'');
t.equal(quote(['a\\"b']), '\'a\\"b\'');
t.equal(quote(['a\\b']), '\'a\\b\'');
t.end();

@@ -49,3 +53,3 @@ });

var x = '`:\\a\\b';
t.equal(quote([x]), '\\`\\:\\\\a\\\\b');
t.equal(quote([x]), "'`:\\a\\b'");
t.end();

@@ -52,0 +56,0 @@ });