summaryrefslogtreecommitdiff
path: root/lib/_stream_writable.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_stream_writable.js')
-rw-r--r--lib/_stream_writable.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
index b317c208fb..570c4c4d0a 100644
--- a/lib/_stream_writable.js
+++ b/lib/_stream_writable.js
@@ -62,7 +62,7 @@ function WritableState(options, stream, isDuplex) {
if (typeof isDuplex !== 'boolean')
isDuplex = stream instanceof Stream.Duplex;
- // object stream flag to indicate whether or not this stream
+ // Object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
@@ -101,15 +101,15 @@ function WritableState(options, stream, isDuplex) {
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
- // not an actual buffer we keep track of, but a measurement
+ // Not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
this.length = 0;
- // a flag to see when we're in the middle of a write.
+ // A flag to see when we're in the middle of a write.
this.writing = false;
- // when true all writes will be buffered until .uncork() call
+ // When true all writes will be buffered until .uncork() call
this.corked = 0;
// A flag to be able to tell if the onwrite cb is called immediately,
@@ -129,7 +129,7 @@ function WritableState(options, stream, isDuplex) {
// The callback that the user supplies to write(chunk,encoding,cb)
this.writecb = null;
- // the amount that is being written when _write is called.
+ // The amount that is being written when _write is called.
this.writelen = 0;
this.bufferedRequest = null;
@@ -331,7 +331,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
};
Object.defineProperty(Writable.prototype, 'writableBuffer', {
- // making it explicit this property is not enumerable
+ // Making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
@@ -350,7 +350,7 @@ function decodeChunk(state, chunk, encoding) {
}
Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
+ // Making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
@@ -359,7 +359,7 @@ Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
}
});
-// if we're already writing something, then just put this
+// If we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
@@ -420,7 +420,7 @@ function onwriteError(stream, state, sync, er, cb) {
--state.pendingcb;
if (sync) {
- // defer the callback if we are being called synchronously
+ // Defer the callback if we are being called synchronously
// to avoid piling up things on the stack
process.nextTick(cb, er);
// this can emit finish, and it will always happen
@@ -496,7 +496,7 @@ function onwriteDrain(stream, state) {
}
}
-// if there's something in the buffer waiting, then process it
+// If there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
state.bufferProcessing = true;
var entry = state.bufferedRequest;
@@ -597,7 +597,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
};
Object.defineProperty(Writable.prototype, 'writableLength', {
- // making it explicit this property is not enumerable
+ // Making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
@@ -686,7 +686,7 @@ function onCorkedFinish(corkReq, state, err) {
}
Object.defineProperty(Writable.prototype, 'destroyed', {
- // making it explicit this property is not enumerable
+ // Making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,