lib/streams.js
function toStream(input) {
  let streamType = isStream(input);
  if (streamType === 'node') {
    return nodeToWeb(input);
  } else if (streamType) {
    return input;
  }
  return new ReadableStream({
    start(controller) {
      controller.enqueue(input);
      controller.close();
    }
  });
}
function toStream(input) {
  let streamType = isStream(input);
  if (streamType === 'node') {
    return nodeToWeb(input);
  } else if (streamType) {
    return input;
  }
  return new ReadableStream({
    start(controller) {
      controller.enqueue(input);
      controller.close();
    }
  });
}
function toStream ( input ) { let streamType = isStream ( input ) ; if ( streamType === 'node' ) { return nodeToWeb ( input ) ; } else if ( streamType ) { return input ; } return new ReadableStream ( { start ( controller ) { controller . enqueue ( input ) ; controller . close ( ) ; } } ) ; }
Convert data to Stream
@param {ReadableStream|Uint8array|String} input  data to convert
@returns {ReadableStream} Converted data
Convert data to Stream