Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shell-quote

Package Overview
Dependencies
Maintainers
1
Versions
27
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 0.0.0 to 0.0.1

4

index.js

@@ -16,3 +16,3 @@ exports.quote = function (xs) {

exports.parse = function (s) {
return s.match(/(['"])((\\\1|[^\1])*?)\1|\S+/g)
return s.match(/(['"])((\\\1|[^\1])*?)\1|(\\ |\S)+/g)
.map(function (s) {

@@ -31,5 +31,5 @@ if (/^'/.test(s)) {

}
else return s;
else return s.replace(/\\([ "'\\$`(){}!#&*|])/g, '$1');
})
;
};
{
"name" : "shell-quote",
"version" : "0.0.0",
"version" : "0.0.1",
"description" : "quote and parse shell commands",

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

@@ -6,3 +6,2 @@ var test = require('tap').test;

t.same(parse('a \'b\' "c"'), [ 'a', 'b', 'c' ]);
t.same(

@@ -12,3 +11,6 @@ parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'),

);
t.same(parse('a b\\ c d'), [ 'a', 'b c', 'd' ]);
t.same(parse('\\$beep bo\\`op'), [ '$beep', 'bo`op' ]);
t.end();
});
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