Files
med-notes/.pnpm-store/v10/files/b8/1290479051563364466b765a9052e30ddb8b46f98e58dde0968fb38addb2feeef64a2a045bfd6798c577c270ed7d6df50b88b6c204fc89d3135ee63be9ce7f
2025-05-09 05:30:08 +02:00

16 lines
392 B
Plaintext

/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
module.exports = function (stream, cb) {
var chunks = []
stream.on('data', function (chunk) {
chunks.push(chunk)
})
stream.once('end', function () {
if (cb) cb(null, Buffer.concat(chunks))
cb = null
})
stream.once('error', function (err) {
if (cb) cb(err)
cb = null
})
}