diff --git a/src/utils/index.ts b/src/utils/index.ts index 02edcc8..a307c30 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -20,7 +20,6 @@ export * from './ArrayElement'; export * from './makeDebug'; export * from './timezoneFriendlyNames'; export * from './nameToSlug'; -export * from './streamToBuffer'; export * from './uploadResume'; export * from './uploadToBuffer'; export * from './anonymousId'; diff --git a/src/utils/streamToBuffer.ts b/src/utils/streamToBuffer.ts deleted file mode 100644 index e298d48..0000000 --- a/src/utils/streamToBuffer.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Stream } from 'stream'; - -export async function streamToBuffer(stream: Stream): Promise { - return new Promise < Buffer >((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const buf: any[] = []; - - stream.on('data', (chunk) => buf.push(chunk)); - stream.on('end', () => resolve(Buffer.concat(buf))); - stream.on('error', (err) => reject(err)); - }); -} \ No newline at end of file