We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
toStream
1 parent f6e555f commit 256dcdeCopy full SHA for 256dcde
lib/streams.js
@@ -4,12 +4,11 @@ import { ArrayStream, Writer } from './writer.js';
4
5
/**
6
* Convert data to Stream
7
- * @param {ReadableStream|Uint8array|String} input data to convert
8
- * @returns {ReadableStream} Converted data
+ * @param {ReadableStream|ArrayStream|Uint8array|String} input data to convert
+ * @returns {ReadableStream|ArrayStream} Converted data
9
*/
10
function toStream(input) {
11
- let streamType = isStream(input);
12
- if (streamType) {
+ if (isStream(input)) {
13
return input;
14
}
15
return new ReadableStream({
0 commit comments