Comparing version 1.5.0 to 1.5.1
@@ -7,2 +7,4 @@ const ascii = require('./lib/ascii') | ||
const LE = new Uint8Array(Uint16Array.of(0xff).buffer)[0] === 0xff | ||
function codecFor (encoding) { | ||
@@ -72,4 +74,4 @@ switch (encoding) { | ||
for (let n = len - (len % 4); i < n; i += 4) { | ||
const x = a.getUint32(i) | ||
const y = b.getUint32(i) | ||
const x = a.getUint32(i, LE) | ||
const y = b.getUint32(i, LE) | ||
if (x < y) return -1 | ||
@@ -145,3 +147,3 @@ if (x > y) return 1 | ||
for (let n = len - (len % 4); i < n; i += 4) { | ||
if (a.getUint32(i) !== b.getUint32(i)) return false | ||
if (a.getUint32(i, LE) !== b.getUint32(i, LE)) return false | ||
} | ||
@@ -148,0 +150,0 @@ |
{ | ||
"name": "b4a", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Bridging the gap between buffers and typed arrays", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
23838
673