Comparing version 1.0.0 to 1.0.1
{ | ||
"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() | ||
}) |
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
4374
41