frappe_docker/frappe-bench/node_modules/superagent/lib/node/parsers/image.js
2017-07-31 15:51:51 +05:30

10 lines
No EOL
229 B
JavaScript

module.exports = function(res, fn){
var data = []; // Binary data needs binary storage
res.on('data', function(chunk){
data.push(chunk);
});
res.on('end', function () {
fn(null, Buffer.concat(data));
});
};