Socket
Socket
Sign inDemoInstall

splitargs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splitargs - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "splitargs",
"version": "0.0.6",
"version": "0.0.7",
"description": "Splits strings into tokens by given separator except treating quoted part as a single token.",

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

@@ -38,5 +38,4 @@ /**

} else if (!!sep) {
ret.push('');
ret.push(element);
}
} else {

@@ -46,5 +45,5 @@ tokenBuffer.push(element);

}
if (tokenBuffer && tokenBuffer.length > 0) {
if (tokenBuffer.length > 0) {
ret.push(tokenBuffer.join(''));
} else {
} else if (!!sep) {
ret.push('');

@@ -51,0 +50,0 @@ }

@@ -17,5 +17,5 @@ /**

it('should split double quoted string', function () {
var i = "I said 'I am sorry.', and he said \"it doesn't matter.\"";
var i = " I said 'I am sorry.', and he said \"it doesn't matter.\" ";
var o = splitargs(i);
expect(o.length).toBe(7);
expect(7).toBe(o.length);
expect(o[0]).toBe("I");

@@ -22,0 +22,0 @@ expect(o[1]).toBe("said");

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