Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.1.0 to 1.1.1

20

index.js

@@ -7,3 +7,3 @@ 'use strict';

var One = exports.One = { valueOf: function() { return 1 } }
var One = exports.One = -1

@@ -18,2 +18,3 @@ inherits(BinaryParseStream, TransformStream)

this._needed = 0
this._single = false
this._parser = this._parse()

@@ -28,6 +29,7 @@ }

var needed = this._needed
, single = this._single
while (queue.length >= needed) {
var chunk = queue.slice(0, +needed)
queue = queue.slice(+needed)
var chunk = queue.slice(0, needed)
queue = queue.slice(needed)

@@ -37,3 +39,3 @@ var ret

try {
if (needed === One)
if (single)
ret = this._parser.next(chunk[0])

@@ -48,4 +50,9 @@ else

if (!ret.done)
needed = ret.value
if (!ret.done) {
var value = ret.value | 0
single = value === One
needed = single
? 1
: value
}
else {

@@ -63,3 +70,4 @@ if (err)

this._needed = needed
this._single = single
return cb()
}
{
"name": "binary-parse-stream",
"version": "1.1.0",
"version": "1.1.1",
"description": "Painless streaming binary protocol parsers using generators.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc