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.1 to 1.2.1

2

index.js

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

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