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

bl

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bl - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

24

bl.js

@@ -53,5 +53,5 @@ 'use strict'

BufferList.prototype._reverseOffset = function (blOffset) {
const bufferId = blOffset[0]
let offset = blOffset[1]
for (let i = 0; i < bufferId; i++) {
var bufferId = blOffset[0]
var offset = blOffset[1]
for (var i = 0; i < bufferId; i++) {
offset += this._bufs[i].length

@@ -125,3 +125,3 @@ }

}
const offset = this._offset(index)
var offset = this._offset(index)
return this._bufs[offset[0]][offset[1]]

@@ -302,13 +302,13 @@ }

const blOffset = this._offset(offset)
let blIndex = blOffset[0] // index of which internal buffer we're working on
let buffOffset = blOffset[1] // offset of the internal buffer we're working on
var blOffset = this._offset(offset)
var blIndex = blOffset[0] // index of which internal buffer we're working on
var buffOffset = blOffset[1] // offset of the internal buffer we're working on
// scan over each buffer
for (blIndex; blIndex < this._bufs.length; blIndex++) {
const buff = this._bufs[blIndex]
var buff = this._bufs[blIndex]
while(buffOffset < buff.length) {
const availableWindow = buff.length - buffOffset
var availableWindow = buff.length - buffOffset
if (availableWindow >= search.length) {
const nativeSearchResult = buff.indexOf(search, buffOffset)
var nativeSearchResult = buff.indexOf(search, buffOffset)
if (nativeSearchResult !== -1) {

@@ -319,3 +319,3 @@ return this._reverseOffset([blIndex, nativeSearchResult])

} else {
const revOffset = this._reverseOffset([blIndex, buffOffset])
var revOffset = this._reverseOffset([blIndex, buffOffset])
if (this._match(revOffset, search)) {

@@ -336,3 +336,3 @@ return revOffset

}
for (let searchOffset = 0; searchOffset < search.length ; searchOffset++) {
for (var searchOffset = 0; searchOffset < search.length ; searchOffset++) {
if(this.get(offset + searchOffset) !== search[searchOffset]){

@@ -339,0 +339,0 @@ return false

{
"name": "bl",
"version": "2.1.1",
"version": "2.1.2",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",

@@ -5,0 +5,0 @@ "main": "bl.js",

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