"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamFunctions = void 0;
class StreamFunctions {
    streamToArrayAsync(stream) {
        return new Promise((resolve, reject) => {
            const items = [];
            stream.on('data', items.push.bind(items));
            stream.on('error', reject);
            stream.on('end', () => resolve(items));
        });
    }
}
exports.StreamFunctions = StreamFunctions;
//# sourceMappingURL=stream-functions.js.map