Socket
Socket
Sign inDemoInstall

uint64be

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uint64be - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "uint64be",
"version": "1.0.0",
"version": "1.0.1",
"description": "Encode / decode big endian unsigned 64 bit integers",

@@ -5,0 +5,0 @@ "main": "index.js",

var uint64be = require('./')
var tape = require('tape')
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1
tape('encode', function (t) {

@@ -8,3 +10,3 @@ t.same(uint64be.encodingLength(42), 8)

t.same(uint64be.encode(42424242424242), new Buffer([0x0, 0x0, 0x26, 0x95, 0xa9, 0xe6, 0x70, 0x47]))
t.same(uint64be.encode(Number.MAX_SAFE_INTEGER), new Buffer([0x0, 0x20, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff]))
t.same(uint64be.encode(MAX_SAFE_INTEGER), new Buffer([0x0, 0x20, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff]))
t.same(uint64be.encode.bytes, 8)

@@ -17,5 +19,5 @@ t.end()

t.same(uint64be.decode(new Buffer([0x0, 0x0, 0x26, 0x95, 0xa9, 0xe6, 0x70, 0x47])), 42424242424242)
t.same(uint64be.decode(new Buffer([0x0, 0x20, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff])), Number.MAX_SAFE_INTEGER)
t.same(uint64be.decode(new Buffer([0x0, 0x20, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff])), MAX_SAFE_INTEGER)
t.same(uint64be.decode.bytes, 8)
t.end()
})
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