stream-parser
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -0,1 +1,6 @@ | ||
0.0.5 / 2012-03-06 | ||
================== | ||
- Update for node v0.9.12 streams2 API Writable/Transform API changes | ||
0.0.4 / 2012-02-23 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -69,2 +69,7 @@ | ||
// XXX: backwards compat with the old Transform API... remove at some point.. | ||
if ('function' == typeof stream.push) { | ||
stream._parserOutput = stream.push.bind(stream); | ||
} | ||
stream._parserInit = true; | ||
@@ -116,5 +121,9 @@ } | ||
function write (chunk, fn) { | ||
function write (chunk, encoding, fn) { | ||
if (!this._parserInit) init(this); | ||
debug('write(%d bytes)', chunk.length); | ||
// XXX: old Writable stream API compat... remove at some point... | ||
if ('function' == typeof encoding) fn = encoding; | ||
data(this, chunk, null, fn); | ||
@@ -133,2 +142,8 @@ } | ||
debug('transform(%d bytes)', chunk.length); | ||
// XXX: old Transform stream API compat... remove at some point... | ||
if ('function' != typeof output) { | ||
output = this._parserOutput; | ||
} | ||
data(this, chunk, output, fn); | ||
@@ -135,0 +150,0 @@ } |
{ | ||
"name": "stream-parser", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Generic interruptible \"parser\" mixin for Transform & Writable streams", | ||
@@ -5,0 +5,0 @@ "main": "lib/parser.js", |
Sorry, the diff of this file is not supported yet
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
19776
461