summaryrefslogtreecommitdiff
path: root/together/node_modules/superagent/lib/node/parsers/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'together/node_modules/superagent/lib/node/parsers/image.js')
-rw-r--r--together/node_modules/superagent/lib/node/parsers/image.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/together/node_modules/superagent/lib/node/parsers/image.js b/together/node_modules/superagent/lib/node/parsers/image.js
new file mode 100644
index 0000000..504f1f3
--- /dev/null
+++ b/together/node_modules/superagent/lib/node/parsers/image.js
@@ -0,0 +1,13 @@
+"use strict";
+
+module.exports = (res, fn) => {
+ const data = []; // Binary data needs binary storage
+
+ res.on('data', chunk => {
+ data.push(chunk);
+ });
+ res.on('end', () => {
+ fn(null, Buffer.concat(data));
+ });
+};
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwicmVzIiwiZm4iLCJkYXRhIiwib24iLCJjaHVuayIsInB1c2giLCJCdWZmZXIiLCJjb25jYXQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbm9kZS9wYXJzZXJzL2ltYWdlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gKHJlcywgZm4pID0+IHtcbiAgY29uc3QgZGF0YSA9IFtdOyAvLyBCaW5hcnkgZGF0YSBuZWVkcyBiaW5hcnkgc3RvcmFnZVxuXG4gIHJlcy5vbignZGF0YScsIChjaHVuaykgPT4ge1xuICAgIGRhdGEucHVzaChjaHVuayk7XG4gIH0pO1xuICByZXMub24oJ2VuZCcsICgpID0+IHtcbiAgICBmbihudWxsLCBCdWZmZXIuY29uY2F0KGRhdGEpKTtcbiAgfSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiOztBQUFBQSxNQUFNLENBQUNDLE9BQVAsR0FBaUIsQ0FBQ0MsR0FBRCxFQUFNQyxFQUFOLEtBQWE7RUFDNUIsTUFBTUMsSUFBSSxHQUFHLEVBQWIsQ0FENEIsQ0FDWDs7RUFFakJGLEdBQUcsQ0FBQ0csRUFBSixDQUFPLE1BQVAsRUFBZ0JDLEtBQUQsSUFBVztJQUN4QkYsSUFBSSxDQUFDRyxJQUFMLENBQVVELEtBQVY7RUFDRCxDQUZEO0VBR0FKLEdBQUcsQ0FBQ0csRUFBSixDQUFPLEtBQVAsRUFBYyxNQUFNO0lBQ2xCRixFQUFFLENBQUMsSUFBRCxFQUFPSyxNQUFNLENBQUNDLE1BQVAsQ0FBY0wsSUFBZCxDQUFQLENBQUY7RUFDRCxDQUZEO0FBR0QsQ0FURCJ9 \ No newline at end of file