@iov/encoding
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -34,3 +34,3 @@ "use strict"; | ||
// on SIGNED int32 in JavaScript and we don't want to risk surprises | ||
return new Uint32(bytes[0] * Math.pow(2, 24) + bytes[1] * Math.pow(2, 16) + bytes[2] * Math.pow(2, 8) + bytes[3]); | ||
return new Uint32(bytes[0] * 2 ** 24 + bytes[1] * 2 ** 16 + bytes[2] * 2 ** 8 + bytes[3]); | ||
} | ||
@@ -41,6 +41,6 @@ toBytesBigEndian() { | ||
return new Uint8Array([ | ||
Math.floor(this.data / Math.pow(2, 24)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 16)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 8)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 0)) & 0xff, | ||
Math.floor(this.data / 2 ** 24) & 0xff, | ||
Math.floor(this.data / 2 ** 16) & 0xff, | ||
Math.floor(this.data / 2 ** 8) & 0xff, | ||
Math.floor(this.data / 2 ** 0) & 0xff, | ||
]); | ||
@@ -52,6 +52,6 @@ } | ||
return new Uint8Array([ | ||
Math.floor(this.data / Math.pow(2, 0)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 8)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 16)) & 0xff, | ||
Math.floor(this.data / Math.pow(2, 24)) & 0xff, | ||
Math.floor(this.data / 2 ** 0) & 0xff, | ||
Math.floor(this.data / 2 ** 8) & 0xff, | ||
Math.floor(this.data / 2 ** 16) & 0xff, | ||
Math.floor(this.data / 2 ** 24) & 0xff, | ||
]); | ||
@@ -58,0 +58,0 @@ } |
{ | ||
"name": "@iov/encoding", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Encoding helpers for IOV projects", | ||
@@ -48,3 +48,3 @@ "author": "IOV SAS <admin@iov.one>", | ||
}, | ||
"gitHead": "a4108f9f268974b0f4b6b53f2668aa4925820feb" | ||
"gitHead": "d7c41b4c42b2a03bb1cda99eebff6b2ce991803a" | ||
} |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
62736