This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+7
View File
@@ -0,0 +1,7 @@
var Buffer = require('buffer').Buffer;
module.exports = function(buf) {
var out = new Buffer(buf.length);
buf.copy(out);
return out;
};
+15
View File
@@ -0,0 +1,15 @@
var isStream = require('./isStream');
module.exports = function(stream) {
if (!isStream(stream)) {
return;
}
var streamType = stream.constructor.name;
// Avoid StreamStream
if (streamType === 'Stream') {
streamType = '';
}
return '<' + streamType + 'Stream>';
};
+1
View File
@@ -0,0 +1 @@
module.exports = require('buffer').Buffer.isBuffer;
+3
View File
@@ -0,0 +1,3 @@
module.exports = function(v) {
return v === null;
};
+5
View File
@@ -0,0 +1,5 @@
var Stream = require('stream').Stream;
module.exports = function(o) {
return !!o && o instanceof Stream;
};