diff --git a/extract.js b/extract.js index 3d682d1..6f3d3c6 100644 --- a/extract.js +++ b/extract.js @@ -3,7 +3,7 @@ var util = require('util'); var bl = require('bl'); var headers = require('./headers'); -var Writable = stream.Writable; +var Writable = stream.Writable || require('readable-stream').Writable; var PassThrough = stream.PassThrough || require('readable-stream').PassThrough; var noop = function() {}; diff --git a/pack.js b/pack.js index 9b94edd..d43fd9d 100644 --- a/pack.js +++ b/pack.js @@ -3,8 +3,8 @@ var util = require('util'); var eos = require('end-of-stream'); var headers = require('./headers'); -var Readable = stream.Readable; -var Writable = stream.Writable; +var Readable = stream.Readable || require('readable-stream').Readable; +var Writable = stream.Writable || require('readable-stream').Writable; var END_OF_TAR = new Buffer(1024); END_OF_TAR.fill(0);