asynciterator
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -972,2 +972,3 @@ var EventEmitter = require('events').EventEmitter; | ||
if (source) { | ||
source.removeListener('end', destinationCloseWhenDone); | ||
source.removeListener('error', destinationEmitError); | ||
@@ -974,0 +975,0 @@ source.removeListener('readable', destinationFillBuffer); |
{ | ||
"name": "asynciterator", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An asynchronous iterator library for advanced object pipelines.", | ||
@@ -5,0 +5,0 @@ "author": "Ruben Verborgh <ruben.verborgh@gmail.com>", |
@@ -119,3 +119,3 @@ # Asynchronous iterators for JavaScript | ||
If you receive `undefined`, | ||
If you receive `null`, | ||
you should wait until the next [`readable` event](http://rubenverborgh.github.io/AsyncIterator/docs/AsyncIterator.html#.event:readable) before reading again. | ||
@@ -122,0 +122,0 @@ This event is not a guarantee that an item _will_ be available. |
@@ -128,5 +128,5 @@ var AsyncIterator = require('../asynciterator'); | ||
it('should not have any listeners for data, readable, or end', function () { | ||
iterator._events.should.not.contain.key('data'); | ||
iterator._events.should.not.contain.key('readable'); | ||
iterator._events.should.not.contain.key('end'); | ||
expect(iterator._events).to.not.contain.key('data'); | ||
expect(iterator._events).to.not.contain.key('readable'); | ||
expect(iterator._events).to.not.contain.key('end'); | ||
}); | ||
@@ -159,5 +159,5 @@ }); | ||
it('should not have any listeners for data, readable, or end', function () { | ||
iterator._events.should.not.contain.key('data'); | ||
iterator._events.should.not.contain.key('readable'); | ||
iterator._events.should.not.contain.key('end'); | ||
expect(iterator._events).to.not.contain.key('data'); | ||
expect(iterator._events).to.not.contain.key('readable'); | ||
expect(iterator._events).to.not.contain.key('end'); | ||
}); | ||
@@ -164,0 +164,0 @@ }); |
@@ -183,5 +183,5 @@ var TransformIterator = require('../asynciterator').TransformIterator; | ||
captureEvents(iterator, 'readable', 'end'); | ||
source._events.should.not.contain.key('data'); | ||
source._events.should.not.contain.key('readable'); | ||
source._events.should.not.contain.key('end'); | ||
expect(source._events).to.not.contain.key('data'); | ||
expect(source._events).to.not.contain.key('readable'); | ||
expect(source._events).to.not.contain.key('end'); | ||
}); | ||
@@ -830,4 +830,16 @@ | ||
}); | ||
it('should not leave `readable` listeners on the source', function () { | ||
EventEmitter.listenerCount(source, 'readable').should.equal(0); | ||
}); | ||
it('should not leave `end` listeners on the source', function () { | ||
EventEmitter.listenerCount(source, 'end').should.equal(0); | ||
}); | ||
it('should not leave `error` listeners on the source', function () { | ||
EventEmitter.listenerCount(source, 'error').should.equal(0); | ||
}); | ||
}); | ||
}); | ||
}); |
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
293919
7146