install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
34
node_modules/stream-exhaust/index.js
generated
vendored
Normal file
34
node_modules/stream-exhaust/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
var Writable = require('stream').Writable;
|
||||
var inherits = require('util').inherits;
|
||||
|
||||
module.exports = resumer;
|
||||
|
||||
function resumer(stream) {
|
||||
if (!stream.readable) {
|
||||
return stream;
|
||||
}
|
||||
|
||||
if (stream._read) {
|
||||
stream.pipe(new Sink);
|
||||
return stream;
|
||||
}
|
||||
|
||||
if (typeof stream.resume === 'function') {
|
||||
stream.resume();
|
||||
return stream;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
function Sink() {
|
||||
Writable.call(this, {
|
||||
objectMode: true
|
||||
});
|
||||
}
|
||||
|
||||
inherits(Sink, Writable);
|
||||
|
||||
Sink.prototype._write = function(chunk, encoding, cb) {
|
||||
setImmediate(cb);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue