binary-parser
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -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() { |
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
1477
114218
2
16