diff --git a/lib/fs.js b/lib/fs.js index e4360ecf7f..ef56a02ac3 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -814,7 +814,7 @@ var WriteStream = fs.WriteStream = function(path, options) { this.path = path; this.fd = null; - this.writeable = true; + this.writable = true; this.flags = 'w'; this.encoding = 'binary'; @@ -863,7 +863,7 @@ WriteStream.prototype.flush = function () { self.busy = false; if (err) { - self.writeable = false; + self.writable = false; if (cb) { cb(err); } @@ -902,8 +902,8 @@ WriteStream.prototype.flush = function () { WriteStream.prototype.write = function (data) { - if (!this.writeable) { - throw new Error('stream not writeable'); + if (!this.writable) { + throw new Error('stream not writable'); } this.drainable = true; @@ -940,7 +940,7 @@ WriteStream.prototype.close = function (cb) { WriteStream.prototype.end = function (cb) { - this.writeable = false; + this.writable = false; this._queue.push([fs.close, cb]); this.flush(); }; @@ -959,7 +959,7 @@ WriteStream.prototype.forceClose = function (cb) { WriteStream.prototype.destroy = function (cb) { var self = this; - this.writeable = false; + this.writable = false; function close() { fs.close(self.fd, function(err) { diff --git a/lib/net.js b/lib/net.js index 05202f2bd5..307af68173 100644 --- a/lib/net.js +++ b/lib/net.js @@ -248,7 +248,7 @@ function allocEmptyBuffer () { function _doFlush () { var socket = this.socket; - // Stream becomes writeable on connect() but don't flush if there's + // Stream becomes writable on connect() but don't flush if there's // nothing actually to write if (socket.flush()) { if (socket._events && socket._events['drain']) socket.emit("drain");