Socket
Socket
Sign inDemoInstall

split2

Package Overview
Dependencies
8
Maintainers
1
Versions
22
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

11

index.js

@@ -27,3 +27,3 @@ /*

if (list.length >= 1) {
this.push(this.mapper((this._last + list.shift())))
push(this, this.mapper((this._last + list.shift())))
} else {

@@ -34,3 +34,3 @@ remaining = this._last + remaining

for (i = 0; i < list.length; i++) {
this.push(this.mapper(list[i]))
push(this, this.mapper(list[i]))
}

@@ -45,3 +45,3 @@

if (this._last)
this.push(this.mapper(this._last))
push(this, this.mapper(this._last))

@@ -51,2 +51,7 @@ cb()

function push(self, val) {
if (val !== undefined)
self.push(val)
}
function noop(incoming) {

@@ -53,0 +58,0 @@ return incoming

{
"name": "split2",
"version": "0.1.1",
"version": "0.1.2",
"description": "split a Text Stream into a Line Stream, using Stream 2",

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

@@ -125,1 +125,13 @@

})
test('do not end on undefined', function(t) {
t.plan(1)
var input = split(function(line) {})
input.pipe(strcb(function(err, list) {
t.deepEqual(list, [])
}))
input.end(new Buffer('hello\nworld'))
})

Sorry, the diff of this file is not supported yet

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