Skip to content

Commit

Permalink
rename all isntances of stream as interval stream
Browse files Browse the repository at this point in the history
  • Loading branch information
czzarr committed Jul 31, 2013
1 parent aac5af2 commit c4c060a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -6,10 +6,10 @@ every x seconds.
```javascript
var request = require('request');
var IntervalStream = require('interval-stream');
var ds = new DelayStream(2000); // emit every 2 seconds
var is = new IntervalStream(2000); // emit every 2 seconds

request('http://isaacs.couchone.com/registry/_all_docs')
.pipe(ds)
.pipe(is)
.pipe(process.stdout);
```
Docs should appear every second.
Expand Down
20 changes: 10 additions & 10 deletions test/index.test.js
@@ -1,11 +1,11 @@
var chai = require('chai');
var through = require('through');
var DelayedStream = require('../');
var ds = new DelayedStream();
var IntervalStream = require('../');
var is = new IntervalStream();

chai.should();

describe('Delay Stream', function () {
describe('Interval Stream', function () {
it('should emit a char every second', function (done) {
var chunks = [];
var counter = 0;
Expand All @@ -19,14 +19,14 @@ describe('Delay Stream', function () {
done();
}

ds.pipe(through(write, end));
is.pipe(through(write, end));

ds.write('a');
ds.write('b');
ds.write('c');
ds.write('e');
ds.write('f');
ds.end();
is.write('a');
is.write('b');
is.write('c');
is.write('e');
is.write('f');
is.end();

var iv = setInterval(function () {
chunks.length.should.equal(++counter);
Expand Down

0 comments on commit c4c060a

Please sign in to comment.