updated sys and created publi

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-21 18:09:49 +01:00
parent 2a6e2ff863
commit cefd1c2ad0
9509 changed files with 744901 additions and 32263 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;
};
+11
View File
@@ -0,0 +1,11 @@
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;
};