We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bfbe11 commit bb88cabCopy full SHA for bb88cab
tasks/compress_attributes.js
@@ -33,11 +33,12 @@ var regexStr = [
33
var regex = new RegExp(regexStr, 'g');
34
35
module.exports = function() {
36
- return through(function(buf, enc, next) {
37
- this.push(
38
- buf.toString('utf-8')
39
- .replace(regex, '')
40
- );
+ var allChunks = [];
+ return through(function(chunk, enc, next) {
+ allChunks.push(chunk);
41
next();
+ }, function(done) {
+ this.push(Buffer.concat(allChunks).toString().replace(regex, ''));
42
+ done();
43
});
44
};
0 commit comments