From c4c060acf34d1414f67036a90e46a46a50880883 Mon Sep 17 00:00:00 2001 From: Stanislas Marion Date: Wed, 31 Jul 2013 16:37:03 +0200 Subject: [PATCH] rename all isntances of stream as interval stream --- README.md | 4 ++-- test/index.test.js | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 62a263c..ea39ac7 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/test/index.test.js b/test/index.test.js index 5a5b205..847d551 100644 --- a/test/index.test.js +++ b/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; @@ -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);