| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d3a743f commit c004aba
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,9 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | + const { | ||
| 4 | + ArrayPrototypeSlice, | ||
| 5 | + } = primordials; | ||
| 6 | + | ||
| 3 | 7 | const { pipeline } = require('internal/streams/pipeline'); | |
| 4 | 8 | const Duplex = require('internal/streams/duplex'); | |
| 5 | 9 | const { destroyer } = require('internal/streams/destroy'); | |
@@ -30,7 +34,7 @@ module.exports = function compose(...streams) { | |||
| 30 | 34 | return Duplex.from(streams[0]); | |
| 31 | 35 | } | |
| 32 | 36 | ||
| 33 | - const orgStreams = [...streams]; | ||
| 37 | + const orgStreams = ArrayPrototypeSlice(streams); | ||
| 34 | 38 | ||
| 35 | 39 | if (typeof streams[0] === 'function') { | |
| 36 | 40 | streams[0] = Duplex.from(streams[0]); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments