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.3.1 to 1.4.0

10

browser.js

@@ -33,2 +33,11 @@ const ascii = require('./lib/ascii')

function isEncoding (encoding) {
try {
codecFor(encoding)
return true
} catch {
return false
}
}
function alloc (size, fill, encoding) {

@@ -311,2 +320,3 @@ const buffer = new Uint8Array(size)

isBuffer,
isEncoding,
alloc,

@@ -313,0 +323,0 @@ allocUnsafe,

@@ -5,2 +5,6 @@ function isBuffer (value) {

function isEncoding (encoding) {
return Buffer.isEncoding(encoding)
}
function alloc (size, fill, encoding) {

@@ -73,2 +77,3 @@ return Buffer.alloc(size, fill, encoding)

isBuffer,
isEncoding,
alloc,

@@ -75,0 +80,0 @@ allocUnsafe,

7

package.json
{
"name": "b4a",
"version": "1.3.1",
"version": "1.4.0",
"description": "Bridging the gap between buffers and typed arrays",
"main": "index.js",
"files": [
"browser.js",
"index.js",
"lib"
],
"browser": {

@@ -7,0 +12,0 @@ "./index.js": "./browser.js"

@@ -19,2 +19,6 @@ # Buffer for Array

#### `b4a.isEncoding(encoding)`
See https://nodejs.org/api/buffer.html#static-method-bufferisencodingencoding
#### `b4a.alloc(size[, fill[, encoding]])`

@@ -86,3 +90,3 @@

Convert a buffer to its canonical representation. In Node.js, the canonical representation is a `Buffer`. In the browser, the canonical reprensetation is a `Uint8Array`.
Convert a buffer to its canonical representation. In Node.js, the canonical representation is a `Buffer`. In the browser, the canonical representation is a `Uint8Array`.

@@ -89,0 +93,0 @@ #### `b4a.toString([encoding[, start[, end]]])`

bench/compare.js
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