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

buffer

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer - npm Package Compare versions

Comparing version 5.6.1 to 5.7.0

7

AUTHORS.md

@@ -60,4 +60,11 @@ # Authors

- Blaine Bublitz (blaine.bublitz@gmail.com)
- clement (clement@seald.io)
- Koushik Dutta (koushd@gmail.com)
- Jordan Harband (ljharb@gmail.com)
- Niklas Mischkulnig (mischnic@users.noreply.github.com)
- Nikolai Vavilov (vvnicholas@gmail.com)
- Fedor Nezhivoi (gyzerok@users.noreply.github.com)
- Peter Newman (peternewman@users.noreply.github.com)
- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com)
#### Generated by bin/update-authors.sh.

2

index.d.ts

@@ -169,3 +169,3 @@ export class Buffer extends Uint8Array {

* If parameter is omitted, buffer will be filled with zeros.
* @param encoding encoding used for call to buf.fill while initalizing
* @param encoding encoding used for call to buf.fill while initializing
*/

@@ -172,0 +172,0 @@ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;

@@ -14,4 +14,4 @@ /*!

var customInspectSymbol =
(typeof Symbol === 'function' && typeof Symbol.for === 'function')
? Symbol.for('nodejs.util.inspect.custom')
(typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
: null

@@ -120,3 +120,3 @@

if (ArrayBuffer.isView(value)) {
return fromArrayLike(value)
return fromArrayView(value)
}

@@ -202,3 +202,3 @@

// prevents accidentally sending in a number that would
// be interpretted as a start offset.
// be interpreted as a start offset.
return typeof encoding === 'string'

@@ -270,2 +270,10 @@ ? createBuffer(size).fill(fill, encoding)

function fromArrayView (arrayView) {
if (isInstance(arrayView, Uint8Array)) {
var copy = new Uint8Array(arrayView)
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)
}
return fromArrayLike(arrayView)
}
function fromArrayBuffer (array, byteOffset, length) {

@@ -410,8 +418,12 @@ if (byteOffset < 0 || array.byteLength < byteOffset) {

if (isInstance(buf, Uint8Array)) {
buf = Buffer.from(buf)
}
if (!Buffer.isBuffer(buf)) {
Uint8Array.prototype.set.call(
buffer,
buf,
pos
)
} else if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
} else {
buf.copy(buffer, pos)
}
buf.copy(buffer, pos)
pos += buf.length

@@ -498,3 +510,3 @@ }

// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
// Force coercion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0

@@ -850,6 +862,2 @@ start >>>= 0

function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {

@@ -910,7 +918,5 @@ return blitBuffer(base64ToBytes(string), buf, offset, length)

case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
return asciiWrite(this, string, offset, length)

@@ -1085,3 +1091,4 @@ case 'base64':

var res = ''
for (var i = 0; i < bytes.length; i += 2) {
// If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
for (var i = 0; i < bytes.length - 1; i += 2) {
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))

@@ -1128,2 +1135,3 @@ }

Buffer.prototype.readUintLE =
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {

@@ -1144,2 +1152,3 @@ offset = offset >>> 0

Buffer.prototype.readUintBE =
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {

@@ -1161,2 +1170,3 @@ offset = offset >>> 0

Buffer.prototype.readUint8 =
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {

@@ -1168,2 +1178,3 @@ offset = offset >>> 0

Buffer.prototype.readUint16LE =
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {

@@ -1175,2 +1186,3 @@ offset = offset >>> 0

Buffer.prototype.readUint16BE =
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {

@@ -1182,2 +1194,3 @@ offset = offset >>> 0

Buffer.prototype.readUint32LE =
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {

@@ -1193,2 +1206,3 @@ offset = offset >>> 0

Buffer.prototype.readUint32BE =
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {

@@ -1311,2 +1325,3 @@ offset = offset >>> 0

Buffer.prototype.writeUintLE =
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {

@@ -1331,2 +1346,3 @@ value = +value

Buffer.prototype.writeUintBE =
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {

@@ -1351,2 +1367,3 @@ value = +value

Buffer.prototype.writeUint8 =
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {

@@ -1360,2 +1377,3 @@ value = +value

Buffer.prototype.writeUint16LE =
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {

@@ -1370,2 +1388,3 @@ value = +value

Buffer.prototype.writeUint16BE =
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {

@@ -1380,2 +1399,3 @@ value = +value

Buffer.prototype.writeUint32LE =
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {

@@ -1392,2 +1412,3 @@ value = +value

Buffer.prototype.writeUint32BE =
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {

@@ -1572,7 +1593,2 @@ value = +value

this.copyWithin(targetStart, start, end)
} else if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (var i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else {

@@ -1579,0 +1595,0 @@ Uint8Array.prototype.set.call(

{
"name": "buffer",
"description": "Node.js Buffer API, for the browser",
"version": "5.6.1",
"version": "5.7.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh",

@@ -37,8 +37,2 @@ # buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

## `buffer` for enterprise
Available as part of the Tidelift Subscription.
The maintainers of `buffer` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-buffer?utm_source=npm-buffer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## install

@@ -45,0 +39,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