testcontainers
Version:
Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container
13 lines • 470 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.streamToString = void 0;
const streamToString = async (stream, options = { trim: false }) => {
const chunks = [];
for await (const chunk of stream) {
chunks.push(Buffer.from(chunk));
}
const str = Buffer.concat(chunks).toString("utf-8");
return options.trim ? str.trim() : str;
};
exports.streamToString = streamToString;
//# sourceMappingURL=streams.js.map
;