Skip to content

Commit

Permalink
Integrate Changes
Browse files Browse the repository at this point in the history
Integrate Changes
  • Loading branch information
caroltrindade authored Apr 11, 2024
2 parents e42c5be + 865e45c commit 889f630
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapcon-utils-js",
"version": "1.3.3",
"version": "1.3.4",
"description": "Utils library for Javascript",
"keywords": [],
"author": {
Expand Down
8 changes: 8 additions & 0 deletions src/s3/formatters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Readable } from 'stream';

export const streamToString = async (stream: Readable | ReadableStream | Blob) => new Promise((resolve, reject) => {
const chunks = []
stream.on('data', chunk => chunks.push(chunk))
stream.on('error', reject)
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')))
})

0 comments on commit 889f630

Please sign in to comment.