diff --git a/src/ssn/streams/streamToString.ts b/src/ssn/streams/streamToString.ts index 3917170..97cf953 100644 --- a/src/ssn/streams/streamToString.ts +++ b/src/ssn/streams/streamToString.ts @@ -1,9 +1,9 @@ import * as stream from 'stream'; import { TextDecoder } from 'util'; -const decoder = new TextDecoder('utf-8'); - export default function streamToString(inputStream: stream.Readable): Promise { + const decoder = new TextDecoder('utf-8'); + return new Promise((resolve, reject) => { const stringParts: string[] = [];