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

thriftrw

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thriftrw - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

2

i64.js

@@ -48,3 +48,3 @@ // Copyright (c) 2015 Uber Technologies, Inc.

} else if (typeof value === 'number') {
buffer.writeInt32BE(value / Math.pow(32), offset, true);
buffer.writeInt32BE(value / Math.pow(2, 32), offset, true);
buffer.writeInt32BE(value, offset + 4, true);

@@ -51,0 +51,0 @@ return new bufrw.WriteResult(null, offset + 8);

{
"name": "thriftrw",
"version": "2.5.1",
"version": "2.5.2",
"description": "thrift encoding/decoding using bufrw",

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

@@ -140,3 +140,3 @@ // Copyright (c) 2015 Uber Technologies, Inc.

test('coerce number', function t(assert) {
test('coerce small number', function t(assert) {
var buffer = new Buffer(8);

@@ -150,2 +150,11 @@ var res = bufferRW.writeInto(10, buffer, 0);

test('coerce large number', function t(assert) {
var buffer = new Buffer(8);
var res = bufferRW.writeInto(Math.pow(2, 50), buffer, 0);
assert.ifError(res.err, 'write into buffer');
assert.equals(res.offset, 8, 'offset after write');
assert.deepEquals(buffer, new Buffer('0004000000000000', 'hex'), 'written value');
assert.end();
});
test('coerce array of bytes', function t(assert) {

@@ -152,0 +161,0 @@ var buffer = new Buffer(8);

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