| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7a8232a commit 3872a02
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,9 +42,7 @@ ObjectSetPrototypeOf(Duplex, Readable); | |||
| 42 | 42 | ||
| 43 | 43 | { | |
| 44 | 44 | // Allow the keys array to be GC'ed. | |
| 45 | - const keys = ObjectKeys(Writable.prototype); | ||
| 46 | - for (let v = 0; v < keys.length; v++) { | ||
| 47 | - const method = keys[v]; | ||
| 45 | + for (const method of ObjectKeys(Writable.prototype)) { | ||
| 48 | 46 | if (!Duplex.prototype[method]) | |
| 49 | 47 | Duplex.prototype[method] = Writable.prototype[method]; | |
| 50 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1064,8 +1064,8 @@ Readable.prototype.wrap = function(stream) { | |||
| 1064 | 1064 | } | |
| 1065 | 1065 | ||
| 1066 | 1066 | // Proxy certain important events. | |
| 1067 | - for (var n = 0; n < kProxyEvents.length; n++) { | ||
| 1068 | - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); | ||
| 1067 | + for (const kProxyEvent of kProxyEvents) { | ||
| 1068 | + stream.on(kProxyEvent, this.emit.bind(this, kProxyEvent)); | ||
| 1069 | 1069 | } | |
| 1070 | 1070 | ||
| 1071 | 1071 | // When we try to consume some more bytes, simply unpause the | |
| Back | FazBrowse Home | New Git URL |
0 commit comments