summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js')
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
index d467615978..aefc68bd90 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -1,11 +1,9 @@
'use strict';
-/*<replacement>*/
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Buffer = require('safe-buffer').Buffer;
-/*</replacement>*/
+var util = require('util');
function copyBuffer(src, target, offset) {
src.copy(target, offset);
@@ -71,4 +69,11 @@ module.exports = function () {
};
return BufferList;
-}(); \ No newline at end of file
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file