Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

binary-parser

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-parser - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

2

lib/binary_parser.js

@@ -442,3 +442,3 @@ //========================================================================================

if (this.options.readUntil === 'eof') {
ctx.pushCode('{0} = buffer.slice(offset, buffer.length - 1);',
ctx.pushCode('{0} = buffer.slice(offset);',
ctx.generateVariable(this.varName)

@@ -445,0 +445,0 @@ );

{
"name": "binary-parser",
"version": "1.1.5",
"version": "1.1.6",
"description": "Blazing-fast binary parser builder",
"main": "lib/binary_parser.js",
"devDependencies": {
"mocha": "*"
"istanbul": "^0.3.14",
"mocha": "^2.2.5"
},
"scripts": {
"test": "mocha --reporter spec"
"test": "mocha --reporter spec",
"cover": "istanbul cover --report html node_modules/.bin/_mocha"
},

@@ -22,12 +24,13 @@ "keywords": [

"author": {
"name" : "Keichi Takahashi",
"email" : "keichi.t@me.com",
"url" : "http://blog.keichi.net/"
"name": "Keichi Takahashi",
"email": "keichi.t@me.com",
"url": "http://blog.keichi.net/"
},
"license": "MIT",
"repository" : {
"type" : "git",
"url" : "http://github.com/Keichi/binary-parser.git"
"repository": {
"type": "git",
"url": "http://github.com/Keichi/binary-parser.git"
},
"bugs" : "http://github.com/Keichi/binary-parser/issues"
"bugs": "http://github.com/Keichi/binary-parser/issues",
"dependencies": {}
}
# Binary-parser
[![Build Status](https://api.shippable.com/projects/540e7af73479c5ea8f9ebc33/badge?branchName=master)](https://app.shippable.com/projects/540e7af73479c5ea8f9ebc33/builds/latest)
[![Circle CI](https://circleci.com/gh/keichi/binary-parser.svg?style=svg)](https://circleci.com/gh/keichi/binary-parser)

@@ -5,0 +5,0 @@ Binary-parser is a binary parser builder library for [node](http://nodejs.org),

@@ -317,2 +317,21 @@ var assert = require('assert');

describe('Buffer parser', function() {
//this is a test for testing a fix of a bug, that removed the last byte of the
//buffer parser
it('should return a buffer with same size', function() {
var bufferParser = new Parser()
.buffer('buf', {
readUntil: 'eof',
formatter: function(buffer) {
return buffer;
}
})
var buffer = new Buffer('John\0Doe\0');
assert.deepEqual(bufferParser.parse(buffer),{buf:buffer});
});
});
describe('Constructors', function() {

@@ -319,0 +338,0 @@ it('should create a custom object type', function() {

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