speclore 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1031,8 +1031,7 @@ var PdfReader = class {
1031
1031
  const uint8 = new Uint8Array(buffer);
1032
1032
  const doc = await pdfjsLib.getDocument({
1033
1033
  data: uint8,
1034
- useWorkerFetch: false,
1035
- isEvalSupported: false
1034
+ useWorkerFetch: false
1036
1035
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1037
1036
  }).promise;
1038
1037
  const textParts = [];
@@ -1042,7 +1041,6 @@ var PdfReader = class {
1042
1041
  const pageText = textContent.items.map((item) => item.str).join("");
1043
1042
  if (pageText) textParts.push(pageText);
1044
1043
  }
1045
- doc.destroy();
1046
1044
  const text = textParts.join("\n");
1047
1045
  return [{
1048
1046
  id: source.replace(/\\/g, "/").replace(/\.pdf$/i, ""),
@@ -1745,8 +1743,7 @@ async function extractPdfText(dataBuffer) {
1745
1743
  const uint8 = new Uint8Array(dataBuffer);
1746
1744
  const doc = await pdfjsLib.getDocument({
1747
1745
  data: uint8,
1748
- useWorkerFetch: false,
1749
- isEvalSupported: false
1746
+ useWorkerFetch: false
1750
1747
  }).promise;
1751
1748
  const textParts = [];
1752
1749
  for (let i = 1; i <= doc.numPages; i++) {
@@ -1755,7 +1752,6 @@ async function extractPdfText(dataBuffer) {
1755
1752
  const pageText = textContent.items.map((item) => item.str).join("");
1756
1753
  if (pageText) textParts.push(pageText);
1757
1754
  }
1758
- doc.destroy();
1759
1755
  return textParts.join("\n");
1760
1756
  }
1761
1757
  async function parsePdfBuffer(dataBuffer, idHint = "document") {