rotating-file-stream
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -210,9 +210,7 @@ "use strict"; | ||
function gzip(src, dst, callback) { | ||
var inp = fs.createReadStream(src); | ||
var out = fs.createWriteStream(dst); | ||
var zip = zlib.createGzip(); | ||
var files = [inp, out, zip]; | ||
const inp = fs.createReadStream(src); | ||
const out = fs.createWriteStream(dst); | ||
const zip = zlib.createGzip(); | ||
for(var i in files) files[i].once("error", callback); | ||
[inp, out, zip].map(e => e.once("error", callback)); | ||
out.once("finish", callback); | ||
@@ -219,0 +217,0 @@ |
@@ -69,3 +69,5 @@ "use strict"; | ||
this.chunks = []; | ||
for(var i in chunks) if(chunks[i].cb) chunks[i].cb(); | ||
chunks.map(e => { | ||
if(e.cb) e.cb(); | ||
}); | ||
@@ -111,3 +113,3 @@ return callback(); | ||
for(var i in arguments) { | ||
for(var i = 0; i < arguments.length; ++i) { | ||
if("function" === typeof arguments[i]) { | ||
@@ -295,3 +297,2 @@ this.once("finish", arguments[i]); | ||
for(var i in compress) RotatingFileStream.prototype[i] = compress[i]; | ||
for(i in interval) RotatingFileStream.prototype[i] = interval[i]; | ||
@@ -298,0 +299,0 @@ |
@@ -73,3 +73,3 @@ "use strict"; | ||
for(var i in res) files.push(res[i].name); | ||
res.map(e => files.push(e.name)); | ||
@@ -99,3 +99,3 @@ fs.writeFile(self.options.history, files.join("\n"), "utf8", function(err) { | ||
for(var i in res) size += res[i].size; | ||
res.map(e => (size += e.size)); | ||
@@ -102,0 +102,0 @@ if(size <= self.options.maxSize) return historyWrite(self, res); |
{ | ||
"name": "rotating-file-stream", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.", | ||
@@ -37,8 +37,8 @@ "scripts": { | ||
"devDependencies": { | ||
"eslint": "6.1.0", | ||
"mocha": "6.2.0", | ||
"eslint": "6.5.1", | ||
"mocha": "6.2.1", | ||
"nyc": "14.1.1", | ||
"typescript": "3.5.3", | ||
"@types/node": "12.6.8" | ||
"typescript": "3.6.3", | ||
"@types/node": "12.7.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
703
43358