You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

multipasta

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multipasta - npm Package Compare versions

Comparing version

to
0.1.16

24

dist/cjs/internal/search.js

@@ -123,9 +123,2 @@ "use strict";

let chunkLength = chunk.length;
if (chunkLength < state.needleLength) {
if (state.previousChunk === undefined) {
state.previousChunk = chunk;
state.previousChunkLength = chunkLength;
return;
}
}
if (state.previousChunk !== undefined) {

@@ -139,2 +132,7 @@ const newChunk = Buffer.allocUnsafe(state.previousChunkLength + chunkLength);

}
if (chunkLength < state.needleLength) {
state.previousChunk = chunk;
state.previousChunkLength = chunkLength;
return;
}
let pos = 0;

@@ -149,2 +147,3 @@ while (pos < chunkLength) {

pos = match + state.needleLength;
continue;
} else if (chunk[chunkLength - 1] in state.indexes) {

@@ -172,11 +171,8 @@ const indexes = state.indexes[chunk[chunkLength - 1]];

}
break;
} else if (pos === 0) {
callback(state.matchIndex, chunk);
} else {
if (pos === 0) {
callback(state.matchIndex, chunk);
} else {
callback(state.matchIndex, chunk.subarray(pos));
}
break;
callback(state.matchIndex, chunk.subarray(pos));
}
break;
}

@@ -183,0 +179,0 @@ }

@@ -117,9 +117,2 @@ function noopMatch(_, __) {

let chunkLength = chunk.length;
if (chunkLength < state.needleLength) {
if (state.previousChunk === undefined) {
state.previousChunk = chunk;
state.previousChunkLength = chunkLength;
return;
}
}
if (state.previousChunk !== undefined) {

@@ -133,2 +126,7 @@ const newChunk = Buffer.allocUnsafe(state.previousChunkLength + chunkLength);

}
if (chunkLength < state.needleLength) {
state.previousChunk = chunk;
state.previousChunkLength = chunkLength;
return;
}
let pos = 0;

@@ -143,2 +141,3 @@ while (pos < chunkLength) {

pos = match + state.needleLength;
continue;
} else if (chunk[chunkLength - 1] in state.indexes) {

@@ -166,11 +165,8 @@ const indexes = state.indexes[chunk[chunkLength - 1]];

}
break;
} else if (pos === 0) {
callback(state.matchIndex, chunk);
} else {
if (pos === 0) {
callback(state.matchIndex, chunk);
} else {
callback(state.matchIndex, chunk.subarray(pos));
}
break;
callback(state.matchIndex, chunk.subarray(pos));
}
break;
}

@@ -177,0 +173,0 @@ }

{
"name": "multipasta",
"version": "0.1.15",
"version": "0.1.16",
"description": "",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -180,10 +180,2 @@ interface SearchState {

if (chunkLength < state.needleLength) {
if (state.previousChunk === undefined) {
state.previousChunk = chunk
state.previousChunkLength = chunkLength
return
}
}
if (state.previousChunk !== undefined) {

@@ -200,2 +192,8 @@ const newChunk = Buffer.allocUnsafe(

if (chunkLength < state.needleLength) {
state.previousChunk = chunk
state.previousChunkLength = chunkLength
return
}
let pos = 0

@@ -211,2 +209,3 @@ while (pos < chunkLength) {

pos = match + state.needleLength
continue
} else if (chunk[chunkLength - 1] in state.indexes) {

@@ -240,11 +239,9 @@ const indexes = state.indexes[chunk[chunkLength - 1]]

}
break
} else if (pos === 0) {
callback(state.matchIndex, chunk)
} else {
if (pos === 0) {
callback(state.matchIndex, chunk)
} else {
callback(state.matchIndex, chunk.subarray(pos))
}
break
callback(state.matchIndex, chunk.subarray(pos))
}
break
}

@@ -251,0 +248,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet