🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

binary-parse-stream

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-parse-stream - npm Package Compare versions

Comparing version

to
1.2.7

4

index.js

@@ -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.