| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ae9a8cd commit c8b6de2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -130,10 +130,10 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { | |||
| 130 | 130 | onEofChunk(stream, state); | |
| 131 | 131 | } else if (state.objectMode || chunk && chunk.length > 0) { | |
| 132 | 132 | if (state.ended && !addToFront) { | |
| 133 | - var e = new Error('stream.push() after EOF'); | ||
| 133 | + const e = new Error('stream.push() after EOF'); | ||
| 134 | 134 | stream.emit('error', e); | |
| 135 | 135 | } else if (state.endEmitted && addToFront) { | |
| 136 | - var e = new Error('stream.unshift() after end event'); | ||
| 136 | + const e = new Error('stream.unshift() after end event'); | ||
| 137 | 137 | stream.emit('error', e); | |
| 138 | 138 | } else { | |
| 139 | 139 | if (state.decoder && !addToFront && !encoding) | |
@@ -640,13 +640,13 @@ Readable.prototype.unpipe = function(dest) { | |||
| 640 | 640 | state.pipesCount = 0; | |
| 641 | 641 | state.flowing = false; | |
| 642 | 642 | ||
| 643 | - for (var i = 0; i < len; i++) | ||
| 643 | + for (let i = 0; i < len; i++) | ||
| 644 | 644 | dests[i].emit('unpipe', this); | |
| 645 | 645 | return this; | |
| 646 | 646 | } | |
| 647 | 647 | ||
| 648 | 648 | // try to find the right one. | |
| 649 | - var i = state.pipes.indexOf(dest); | ||
| 649 | + const i = state.pipes.indexOf(dest); | ||
| 650 | 650 | if (i === -1) | |
| 651 | 651 | return this; | |
| 652 | 652 | ||
@@ -847,7 +847,7 @@ function fromList(n, state) { | |||
| 847 | 847 | if (n < list[0].length) { | |
| 848 | 848 | // just take a part of the first list item. | |
| 849 | 849 | // slice is the same for buffers and strings. | |
| 850 | - var buf = list[0]; | ||
| 850 | + const buf = list[0]; | ||
| 851 | 851 | ret = buf.slice(0, n); | |
| 852 | 852 | list[0] = buf.slice(n); | |
| 853 | 853 | } else if (n === list[0].length) { | |
@@ -863,7 +863,7 @@ function fromList(n, state) { | |||
| 863 | 863 | ||
| 864 | 864 | var c = 0; | |
| 865 | 865 | for (var i = 0, l = list.length; i < l && c < n; i++) { | |
| 866 | - var buf = list[0]; | ||
| 866 | + const buf = list[0]; | ||
| 867 | 867 | var cpy = Math.min(n - c, buf.length); | |
| 868 | 868 | ||
| 869 | 869 | if (stringMode) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments