+1
-1
| { | ||
| "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", |
+4
-0
@@ -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; |
+6
-0
@@ -67,3 +67,9 @@ /** | ||
| }); | ||
| it('should split to 4 empty strings', function () { | ||
| var i = ',,,'; | ||
| var o = splitargs(i, ',', true); | ||
| expect(o.length).toBe(4); | ||
| }) | ||
| }); | ||
| })(); |
6302
4.72%111
8.82%