🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

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

to
0.0.5

2

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

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

@@ -37,2 +37,4 @@ /**

tokenBuffer = [];
} else {
ret.push('');
}

@@ -45,2 +47,4 @@ } else {

ret.push(tokenBuffer.join(''));
} else {
ret.push('');
}

@@ -47,0 +51,0 @@ return ret;

@@ -67,3 +67,9 @@ /**

});
it('should split to 4 empty strings', function () {
var i = ',,,';
var o = splitargs(i, ',', true);
expect(o.length).toBe(4);
})
});
})();