Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rotating-file-stream

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rotating-file-stream - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

10

compress.js

@@ -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 @@

7

index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc