Comparing version 0.1.1 to 0.1.2
@@ -6,3 +6,3 @@ { | ||
"description": "tail a file in node", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
17
tail.js
@@ -30,5 +30,2 @@ var Tail, environment, events, fs; | ||
this.queue.shift(); | ||
if (environment === 'development') { | ||
console.log("" + this.queue.length + " queue length on end of stream at " + (new Date())); | ||
} | ||
if (this.queue.length >= 1) { | ||
@@ -70,8 +67,10 @@ this.internalDispatcher.emit("next"); | ||
fs.watchFile(this.filename, __bind(function(curr, prev) { | ||
this.queue.push({ | ||
start: prev.size, | ||
end: curr.size | ||
}); | ||
if (this.queue.length === 1) { | ||
return this.internalDispatcher.emit("next"); | ||
if (curr.size > prev.size) { | ||
this.queue.push({ | ||
start: prev.size, | ||
end: curr.size | ||
}); | ||
if (this.queue.length === 1) { | ||
return this.internalDispatcher.emit("next"); | ||
} | ||
} | ||
@@ -78,0 +77,0 @@ }, this)); |
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
213988
3026
78