Socket
Socket
Sign inDemoInstall

string-argv

Package Overview
Dependencies
0
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

13

index.js

@@ -30,3 +30,3 @@ "use strict";

// Index 0 is the matched text, which we use if no captured group exists
myArray.push(match[1] || match[5] || match[0]);
myArray.push(firstString(match[1], match[5], match[0]));
}

@@ -37,1 +37,12 @@ } while (match !== null);

}
// Accepts any number of arguments, and returns the first one that is a string
// (even an empty string)
function firstString() {
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (typeof arg === "string") {
return arg;
}
}
}

12

package.json
{
"name": "string-argv",
"description": "string-argv parses a string into an argument array to mimic process.argv. This is useful when testing Command Line Utilities that you want to pass arguments to.",
"version": "0.1.1",
"contributors": [{
"name": "Michael Ferris",
"email": "mike.ferri@hotmail.com"
}],
"version": "0.1.2",
"contributors": [
{
"name": "Michael Ferris",
"email": "mike.ferri@hotmail.com"
}
],
"author": {

@@ -10,0 +12,0 @@ "name": "Anthony McCormick",

@@ -0,0 +0,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