multipasta
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -126,4 +126,3 @@ "use strict"; | ||
} | ||
function writeBuffer(chunk_) { | ||
let chunk = Buffer.isBuffer(chunk_) ? chunk_ : Buffer.from(chunk_); | ||
function writeBuffer(chunk) { | ||
let chunkLength = chunk.length; | ||
@@ -145,3 +144,3 @@ if (state.previousChunk !== undefined) { | ||
while (pos < chunkLength) { | ||
const match = chunk.indexOf(state.needle, pos); | ||
const match = Buffer.prototype.indexOf.call(chunk, state.needle, pos); | ||
if (match > -1) { | ||
@@ -148,0 +147,0 @@ if (match > pos) { |
@@ -120,4 +120,3 @@ function makeMatcher(needle, needleFirstVariationIndex) { | ||
} | ||
function writeBuffer(chunk_) { | ||
let chunk = Buffer.isBuffer(chunk_) ? chunk_ : Buffer.from(chunk_); | ||
function writeBuffer(chunk) { | ||
let chunkLength = chunk.length; | ||
@@ -139,3 +138,3 @@ if (state.previousChunk !== undefined) { | ||
while (pos < chunkLength) { | ||
const match = chunk.indexOf(state.needle, pos); | ||
const match = Buffer.prototype.indexOf.call(chunk, state.needle, pos); | ||
if (match > -1) { | ||
@@ -142,0 +141,0 @@ if (match > pos) { |
{ | ||
"name": "multipasta", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -174,4 +174,3 @@ interface SearchState { | ||
function writeBuffer(chunk_: Buffer | Uint8Array): void { | ||
let chunk = Buffer.isBuffer(chunk_) ? chunk_ : Buffer.from(chunk_) | ||
function writeBuffer(chunk: Buffer | Uint8Array): void { | ||
let chunkLength = chunk.length | ||
@@ -198,3 +197,3 @@ | ||
while (pos < chunkLength) { | ||
const match = chunk.indexOf(state.needle, pos) | ||
const match = Buffer.prototype.indexOf.call(chunk, state.needle, pos) | ||
@@ -201,0 +200,0 @@ if (match > -1) { |
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
193179
3194