unique-stream
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -35,3 +35,3 @@ var Stream = require('stream'); | ||
ended++; | ||
if (ended == pipes) { | ||
if (ended === pipes || pipes === 0) { | ||
s.writable = false; | ||
@@ -38,0 +38,0 @@ s.emit('end'); |
{ | ||
"name": "unique-stream", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "node.js through stream that emits a unique stream of objects based on criteria", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ # unique-stream | ||
[![build status](https://secure.travis-ci.org/eugeneware/unique-stream.png)](http://travis-ci.org/eugeneware/unique-stream) | ||
## Installation | ||
@@ -7,0 +9,0 @@ |
@@ -92,2 +92,18 @@ var expect = require('chai').expect | ||
}); | ||
it('should be able to handle uniqueness when not piped', function(done) { | ||
var stream = unique(); | ||
var count = 0; | ||
stream.on('data', function (data) { | ||
expect(data).to.equal('hello'); | ||
count++; | ||
}); | ||
stream.on('end', function() { | ||
expect(count).to.equal(1); | ||
done(); | ||
}); | ||
stream.write('hello'); | ||
stream.write('hello'); | ||
stream.end(); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5648
6
141
90