bufferedstream
Advanced tools
Comparing version
var util = require('util'); | ||
var Stream = require('stream'); | ||
// Use node 0.10's setImmediate for asynchronous operations, otherwise for | ||
// older versions of node use process.nextTick. | ||
var async = (typeof setImmediate === 'function') ? setImmediate : process.nextTick; | ||
module.exports = BufferedStream; | ||
@@ -142,3 +146,3 @@ | ||
process.nextTick(function tick() { | ||
async(function tick() { | ||
if (stream.paused) { | ||
@@ -154,3 +158,3 @@ stream._flushing = false; | ||
} else { | ||
process.nextTick(tick); | ||
async(tick); | ||
} | ||
@@ -157,0 +161,0 @@ }); |
{ | ||
"author": "Michael Jackson <mjijackson@gmail.com>", | ||
"name": "bufferedstream", | ||
"description": "A base stream class for node that reliably buffers until next tick", | ||
"version": "1.5.1", | ||
"description": "A stream class for node that reliably buffers until next tick", | ||
"version": "1.6.0", | ||
"repository": { | ||
@@ -7,0 +7,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
17234
1.75%399
0.76%1
Infinity%