binary-parse-stream
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -33,7 +33,7 @@ 'use strict'; | ||
if (this.__needed !== 0) | ||
if (this.__needed) | ||
this.__fresh = false | ||
if (!ret.done) | ||
this.__needed = +ret.value | ||
this.__needed = ret.value | 0 | ||
else { | ||
@@ -40,0 +40,0 @@ this.push(ret.value) |
{ | ||
"name": "binary-parse-stream", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Painless streaming binary protocol parsers using generators.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,2 +9,6 @@ # binary-parse-stream | ||
## Synchronous | ||
This module uses the exact same generator interface as [binary-parser](https://github.com/nathan7/binary-parser), which presents a synchronous interface to a generator parser. | ||
## Usage | ||
@@ -18,3 +22,3 @@ | ||
BinaryParseStream is a TransformStream that consumes buffers and outputs objects on the other end. | ||
It expects your sublcass to implement a `_parse` method that is a generator. | ||
It expects your subclass to implement a `_parse` method that is a generator. | ||
When your generator yields a number, it'll be fed a buffer of that length from the input. | ||
@@ -21,0 +25,0 @@ If it yields -1, it'll be given the value of the first byte instead of a single-byte buffer. |
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
3623
47