binary-parse-stream
Advanced tools
Comparing version 1.1.1 to 1.2.1
@@ -47,3 +47,3 @@ 'use strict'; | ||
if (!ret.done) { | ||
var value = ret.value | 0 | ||
var value = ret.value | ||
single = value === One | ||
@@ -50,0 +50,0 @@ needed = single |
{ | ||
"name": "binary-parse-stream", | ||
"version": "1.1.1", | ||
"version": "1.2.1", | ||
"description": "Painless streaming binary protocol parsers using generators.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ # binary-parse-stream | ||
When your generator yields a number, it'll be fed a buffer of that length from the input. | ||
If it yields the special `One` object, it'll be given the value of the first byte. | ||
If it yields -1, it'll be given the value of the first byte instead of a single-byte buffer. | ||
When your generator returns, the return value will be pushed to the output side. | ||
@@ -30,3 +30,2 @@ | ||
var BinaryParseStream = require('binary-parse-stream') | ||
, One = BinaryParseStream.One | ||
, inherits = require('util').inherits | ||
@@ -40,3 +39,3 @@ | ||
var type = (yield 4).readUInt32BE(0, true) | ||
, length = yield One | ||
, length = yield -1 | ||
, buf = yield length | ||
@@ -43,0 +42,0 @@ return { type: type, buf: buf } |
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
3425
42