sorted-union-stream
Advanced tools
Comparing version 3.2.0 to 3.2.1
17
index.js
@@ -41,3 +41,3 @@ const { Readable } = require('streamx') | ||
if (l === null) { | ||
this.push(this._map(null, r)) | ||
this._mapAndPush(null, r) | ||
this.right.consume() | ||
@@ -47,3 +47,3 @@ return cb(null) | ||
if (r === null) { | ||
this.push(this._map(l, null)) | ||
this._mapAndPush(l, null) | ||
this.left.consume() | ||
@@ -56,4 +56,4 @@ return cb(null) | ||
if (cmp === 0) { | ||
this.push(this._map(l, r)) | ||
if (this._both) this.push(this._map(l, r)) | ||
this._mapAndPush(l, r) | ||
if (this._both) this._mapAndPush(l, r) | ||
this.left.consume() | ||
@@ -64,3 +64,3 @@ this.right.consume() | ||
if (cmp < 0) { | ||
this.push(this._map(l, null)) | ||
this._mapAndPush(l, null) | ||
this.left.consume() | ||
@@ -70,3 +70,3 @@ return cb(null) | ||
this.push(this._map(null, r)) | ||
this._mapAndPush(null, r) | ||
this.right.consume() | ||
@@ -76,2 +76,7 @@ cb(null) | ||
_mapAndPush (l, r) { | ||
const data = this._map(l, r) | ||
if (data !== null) this.push(data) | ||
} | ||
_predestroy () { | ||
@@ -78,0 +83,0 @@ this.left.stream.destroy() |
{ | ||
"name": "sorted-union-stream", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
9357
211