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 2.1.8 to 2.1.9

2

bundle.js

@@ -401,3 +401,3 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"Focm2+":[function(require,module,exports){

} else {
target._set(new Uint8Array(this.buffer, start, len), target_start)
target._set(this.subarray(start, start + len), target_start)
}

@@ -404,0 +404,0 @@ }

@@ -400,3 +400,3 @@ /**

} else {
target._set(new Uint8Array(this.buffer, start, len), target_start)
target._set(this.subarray(start, start + len), target_start)
}

@@ -403,0 +403,0 @@ }

{
"name": "buffer",
"description": "Node.js Buffer API, for the browser",
"version": "2.1.8",
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)",
"version": "2.1.9",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
"url": "http://feross.org"
},
"bugs": {

@@ -18,5 +22,5 @@ "url": "https://github.com/feross/buffer/issues"

"devDependencies": {
"benchmark": "*",
"benchmark": "1.x",
"browserify": "3.x",
"tape": "*"
"tape": "2.x"
},

@@ -23,0 +27,0 @@ "homepage": "http://feross.org",

@@ -185,2 +185,2 @@ # buffer (native-buffer-browserify)

MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), Romain Beauxis, and other contributors.
MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.

@@ -13,3 +13,2 @@ var B = require('../').Buffer

test('new buffer from string', function (t) {
t.plan(1)
t.equal(

@@ -142,3 +141,2 @@ new B('hey', 'utf8').toString(),

test('buffer toJSON()', function (t) {
t.plan(1)
var data = [1, 2, 3, 4]

@@ -153,7 +151,5 @@ t.deepEqual(

test('buffer copy example', function (t) {
t.plan(1)
var buf1 = new B(26)
var buf2 = new B(26)
buf1 = new B(26)
buf2 = new B(26)
for (var i = 0 ; i < 26 ; i++) {

@@ -160,0 +156,0 @@ buf1[i] = i + 97; // 97 is ASCII a

@@ -29,18 +29,16 @@ var B = require('../').Buffer

test('utf16le to utf16', function (t) {
t.plan(1);
t.equal(
new B(new B('abcd', 'utf8').toString('utf16le'), 'utf16le').toString('utf8'),
'abcd'
);
t.end();
});
)
t.end()
})
test('utf16le to hex', function (t) {
t.plan(1);
t.equal(
new B('abcd', 'utf16le').toString('hex'),
'6100620063006400'
);
t.end();
});
)
t.end()
})

@@ -201,3 +199,2 @@ test('ascii buffer to base64', function (t) {

test('concat() a varying number of buffers', function (t) {
t.plan(5)
var zero = []

@@ -222,3 +219,2 @@ var one = [ new B('asdf') ]

test('fill', function(t) {
t.plan(1)
var b = new B(10)

@@ -231,3 +227,2 @@ b.fill(2)

test('copy() empty buffer with sourceEnd=0', function (t) {
t.plan(1)
var source = new B([42])

@@ -240,4 +235,18 @@ var destination = new B([43])

test('copy() after slice()', function(t) {
var source = new B(200)
var dest = new B(200)
var expected = new B(200)
for (var i = 0; i < 200; i++) {
source[i] = i
dest[i] = 0
}
source.slice(2).copy(dest)
source.copy(expected, 0, 2)
t.deepEqual(dest, expected)
t.end()
})
test('base64 ignore whitespace', function(t) {
t.plan(1)
var text = '\n YW9ldQ== '

@@ -250,3 +259,2 @@ var buf = new B(text, 'base64')

test('buffer.slice sets indexes', function (t) {
t.plan(1)
t.equal((new B('hallo')).slice(0, 5).toString(), 'hallo')

@@ -264,5 +272,4 @@ t.end()

test('base64 strings without padding', function (t) {
t.plan(1)
t.equal((new B('YW9ldQ', 'base64').toString()), 'aoeu')
t.end()
})

@@ -5,3 +5,2 @@ var B = require('../').Buffer

test('indexes from a string', function(t) {
t.plan(3)
var buf = new B('abc')

@@ -11,6 +10,6 @@ t.equal(buf[0], 97)

t.equal(buf[2], 99)
t.end()
})
test('indexes from an array', function(t) {
t.plan(3)
var buf = new B([ 97, 98, 99 ])

@@ -20,6 +19,6 @@ t.equal(buf[0], 97)

t.equal(buf[2], 99)
t.end()
})
test('set then modify indexes from an array', function(t) {
t.plan(4)
var buf = new B([ 97, 98, 99 ])

@@ -32,2 +31,3 @@ t.equal(buf[2], 99)

t.equal(buf.toString(), 'abm')
t.end()
})

@@ -5,3 +5,2 @@ var B = require('../').Buffer

test('Buffer.isBuffer', function (t) {
t.plan(3)
t.equal(B.isBuffer(new B('hey', 'utf8')), true)

@@ -8,0 +7,0 @@ t.equal(B.isBuffer(new B([1, 2, 3], 'utf8')), true)

@@ -5,3 +5,2 @@ var B = require('../').Buffer

test('Buffer.isEncoding', function (t) {
t.plan(3)
t.equal(B.isEncoding('HEX'), true)

@@ -8,0 +7,0 @@ t.equal(B.isEncoding('hex'), true)

@@ -1,2 +0,2 @@

var B = require('../index.js').Buffer
var B = require('../').Buffer
var test = require('tape')

@@ -3,0 +3,0 @@

@@ -5,3 +5,2 @@ var B = require('../').Buffer

test('detect utf16 surrogate pairs', function(t) {
t.plan(1)
var text = '\uD83D\uDE38' + '\uD83D\uDCAD' + '\uD83D\uDC4D'

@@ -14,3 +13,2 @@ var buf = new B(text)

test('throw on orphaned utf16 surrogate lead code point', function(t) {
t.plan(1)
var text = '\uD83D\uDE38' + '\uD83D' + '\uD83D\uDC4D'

@@ -28,3 +26,2 @@ var err

test('throw on orphaned utf16 surrogate trail code point', function(t) {
t.plan(1)
var text = '\uD83D\uDE38' + '\uDCAD' + '\uD83D\uDC4D'

@@ -31,0 +28,0 @@ var err

Sorry, the diff of this file is not supported yet

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