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

b4a

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b4a - npm Package Compare versions

Comparing version 1.6.6 to 1.6.7

79

browser.js

@@ -20,2 +20,3 @@ const ascii = require('./lib/ascii')

case undefined:
case null:
return utf8

@@ -470,2 +471,70 @@ case 'ucs2':

function writeDoubleBE (buffer, value, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
view.setFloat64(offset, value, false)
return offset + 8
}
function writeFloatBE (buffer, value, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
view.setFloat32(offset, value, false)
return offset + 4
}
function writeUInt32BE (buffer, value, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
view.setUint32(offset, value, false)
return offset + 4
}
function writeInt32BE (buffer, value, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
view.setInt32(offset, value, false)
return offset + 4
}
function readDoubleBE (buffer, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
return view.getFloat64(offset, false)
}
function readFloatBE (buffer, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
return view.getFloat32(offset, false)
}
function readUInt32BE (buffer, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
return view.getUint32(offset, false)
}
function readInt32BE (buffer, offset) {
if (offset === undefined) offset = 0
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength)
return view.getInt32(offset, false)
}
module.exports = exports = {

@@ -500,3 +569,11 @@ isBuffer,

readUInt32LE,
readInt32LE
readInt32LE,
writeDoubleBE,
writeFloatBE,
writeUInt32BE,
writeInt32BE,
readDoubleBE,
readFloatBE,
readUInt32BE,
readInt32BE
}

@@ -118,2 +118,34 @@ function isBuffer (value) {

function writeDoubleBE (buffer, value, offset) {
return toBuffer(buffer).writeDoubleBE(value, offset)
}
function writeFloatBE (buffer, value, offset) {
return toBuffer(buffer).writeFloatBE(value, offset)
}
function writeUInt32BE (buffer, value, offset) {
return toBuffer(buffer).writeUInt32BE(value, offset)
}
function writeInt32BE (buffer, value, offset) {
return toBuffer(buffer).writeInt32BE(value, offset)
}
function readDoubleBE (buffer, offset) {
return toBuffer(buffer).readDoubleBE(offset)
}
function readFloatBE (buffer, offset) {
return toBuffer(buffer).readFloatBE(offset)
}
function readUInt32BE (buffer, offset) {
return toBuffer(buffer).readUInt32BE(offset)
}
function readInt32BE (buffer, offset) {
return toBuffer(buffer).readInt32BE(offset)
}
module.exports = {

@@ -148,3 +180,12 @@ isBuffer,

readUInt32LE,
readInt32LE
readInt32LE,
writeDoubleBE,
writeFloatBE,
writeUInt32BE,
writeInt32BE,
readDoubleBE,
readFloatBE,
readUInt32BE,
readInt32BE
}

8

package.json
{
"name": "b4a",
"version": "1.6.6",
"version": "1.6.7",
"description": "Bridging the gap between buffers and typed arrays",

@@ -28,6 +28,6 @@ "main": "index.js",

"devDependencies": {
"brittle": "^1.3.5",
"nanobench": "^2.1.1",
"standard": "^16.0.3"
"brittle": "^3.5.2",
"nanobench": "^3.0.0",
"standard": "^17.1.0"
}
}
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