binary-parse-stream
Advanced tools
Comparing version 1.0.0 to 1.1.0
20
index.js
@@ -32,6 +32,13 @@ 'use strict'; | ||
var ret | ||
if (needed === One) | ||
ret = this._parser.next(chunk[0]) | ||
else | ||
ret = this._parser.next(chunk) | ||
, err | ||
try { | ||
if (needed === One) | ||
ret = this._parser.next(chunk[0]) | ||
else | ||
ret = this._parser.next(chunk) | ||
} | ||
catch (e) { | ||
err = e | ||
ret = { done: true } | ||
} | ||
@@ -41,3 +48,6 @@ if (!ret.done) | ||
else { | ||
this.push(ret.value) | ||
if (err) | ||
this.emit('error', err) | ||
else | ||
this.push(ret.value) | ||
needed = 0 | ||
@@ -44,0 +54,0 @@ this._parser = this._parse() |
{ | ||
"name": "binary-parse-stream", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Painless streaming binary protocol parsers using generators.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
3327
50