| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 717d9a7 commit ee38d2c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,23 +63,23 @@ module.exports = function duplexify(body, name) { | |||
| 63 | 63 | } | |
| 64 | 64 | ||
| 65 | 65 | if (isReadableNodeStream(body)) { | |
| 66 | - return _duplexify({ readable: body }); | ||
| 66 | + return _duplexify({ __proto__: null, readable: body }); | ||
| 67 | 67 | } | |
| 68 | 68 | ||
| 69 | 69 | if (isWritableNodeStream(body)) { | |
| 70 | - return _duplexify({ writable: body }); | ||
| 70 | + return _duplexify({ __proto__: null, writable: body }); | ||
| 71 | 71 | } | |
| 72 | 72 | ||
| 73 | 73 | if (isNodeStream(body)) { | |
| 74 | - return _duplexify({ writable: false, readable: false }); | ||
| 74 | + return _duplexify({ __proto__: null, writable: false, readable: false }); | ||
| 75 | 75 | } | |
| 76 | 76 | ||
| 77 | 77 | if (isReadableStream(body)) { | |
| 78 | - return _duplexify({ readable: Readable.fromWeb(body) }); | ||
| 78 | + return _duplexify({ __proto__: null, readable: Readable.fromWeb(body) }); | ||
| 79 | 79 | } | |
| 80 | 80 | ||
| 81 | 81 | if (isWritableStream(body)) { | |
| 82 | - return _duplexify({ writable: Writable.fromWeb(body) }); | ||
| 82 | + return _duplexify({ __proto__: null, writable: Writable.fromWeb(body) }); | ||
| 83 | 83 | } | |
| 84 | 84 | ||
| 85 | 85 | if (typeof body === 'function') { | |
@@ -173,7 +173,7 @@ module.exports = function duplexify(body, name) { | |||
| 173 | 173 | duplexify(body.writable) : | |
| 174 | 174 | undefined; | |
| 175 | 175 | ||
| 176 | - return _duplexify({ readable, writable }); | ||
| 176 | + return _duplexify({ __proto__: null, readable, writable }); | ||
| 177 | 177 | } | |
| 178 | 178 | ||
| 179 | 179 | const then = body?.then; | |
@@ -231,12 +231,12 @@ function fromAsyncGen(fn) { | |||
| 231 | 231 | write(chunk, encoding, cb) { | |
| 232 | 232 | const _resolve = resolve; | |
| 233 | 233 | resolve = null; | |
| 234 | - _resolve({ chunk, done: false, cb }); | ||
| 234 | + _resolve({ __proto__: null, chunk, done: false, cb }); | ||
| 235 | 235 | }, | |
| 236 | 236 | final(cb) { | |
| 237 | 237 | const _resolve = resolve; | |
| 238 | 238 | resolve = null; | |
| 239 | - _resolve({ done: true, cb }); | ||
| 239 | + _resolve({ __proto__: null, done: true, cb }); | ||
| 240 | 240 | }, | |
| 241 | 241 | destroy(err, cb) { | |
| 242 | 242 | ac.abort(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments