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

bufrw

Package Overview
Dependencies
Maintainers
6
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bufrw - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.gitignore

2

package.json
{
"name": "bufrw",
"version": "1.2.0",
"version": "1.2.1",
"description": "Buffer Reading and Writing",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -68,5 +68,5 @@ // Copyright (c) 2015 Uber Technologies, Inc.

SeriesRW.prototype.poolReadFrom = function poolReadFrom(destResult, buffer, offset) {
if (!Array.isArray(destResult.value)) {
destResult.value = new Array(this.rws.length);
}
// The prior value cannot be reused, even if it is already an array of the right size.
// The array may have been captured by reference by the prior consumer.
var values = new Array(this.rws.length);
for (var i = 0; i < this.rws.length; i++) {

@@ -76,5 +76,7 @@ this.rws[i].poolReadFrom(readResult, buffer, offset);

offset = readResult.offset;
destResult.value[i] = readResult.value;
values[i] = readResult.value;
}
// The values must be assigned to the result last so reading a series is reentrant.
destResult.value = values;
return destResult.reset(null, offset, destResult.value);
};

@@ -66,2 +66,6 @@ // Copyright (c) 2015 Uber Technologies, Inc.

var duduple = SeriesRW(
SeriesRW(atoms.UInt8, atoms.UInt8),
SeriesRW(atoms.UInt8, atoms.UInt8));
test('SeriesRW: tinyShortWord', testRW.cases(tinyShortWord, [

@@ -120,1 +124,7 @@ [[0, 0, 0], [0x00,

]));
test('SeriesRW: duple of duples', testRW.cases(duduple, [
[[[0, 1], [2, 3]], [
0x00, 0x01, 0x02, 0x03
]]
]));
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