Skip to content

Commit

Permalink
Make stream a public property.
Browse files Browse the repository at this point in the history
Closes #10.
  • Loading branch information
flatheadmill committed Mar 3, 2014
1 parent c90c778 commit 7f395c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ var ok = require('assert').ok
util.inherits(Blocker, Transform)

function Blocker (stream) {
this._stream = stream
this._stream.on('readable', this._read.bind(this))
this.stream = stream
this.stream.on('readable', this._read.bind(this))
}

Blocker.prototype.block = function (size, callback) {
Expand All @@ -21,7 +21,7 @@ Blocker.prototype._read = function () {

Blocker.prototype._consume = function () {
if (this._next && this._readable) {
var chunk = this._stream.read(this._next.size)
var chunk = this.stream.read(this._next.size)
if (chunk != null) {
var callback = this._next.callback
delete this._next
Expand Down
1 change: 1 addition & 0 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buffering are provided by `stream.Readable`.

### Issue by Issue

* Make `stream` a public property. #10.
* Release version 0.0.1. #9.
* Assert that block is properly sliced #8.
* Implement basic block reading interface. #7.

0 comments on commit 7f395c4

Please sign in to comment.