Methods
streamToBuffer(stream) → {Promise.<Buffer>}
Transforms a ReadableStream into a Buffer
Parameters:
| Name | Type | Description |
|---|---|---|
stream |
ReadableStream |
- Source:
Returns:
Promise that resolves to original file contents as a Buffer
- Type
- Promise.<Buffer>
streamtoString(stream) → {Promise.<string>}
Transforms a ReadableStream into a string
Parameters:
| Name | Type | Description |
|---|---|---|
stream |
ReadableStream |
- Source:
Returns:
Promise that resolves to original file contents as a UTF-8 encoded string
- Type
- Promise.<string>