office-text-extractor
Advanced tools
Comparing version 3.4.0-beta.1 to 3.4.0-beta.2
{ | ||
"name": "office-text-extractor", | ||
"version": "3.4.0-beta.1", | ||
"version": "3.4.0-beta.2", | ||
"description": "Yet another library to extract text from MS Office and PDF files", | ||
@@ -56,2 +56,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/fs-extra": "11.0.4", | ||
"@types/js-yaml": "4.0.9", | ||
@@ -58,0 +59,0 @@ "@types/node": "20.14.11", |
// source/util.ts | ||
// Utility functions to help with the handling of input. | ||
import fs from 'fs-extra' | ||
import { got as fetch } from 'got' | ||
import { type Buffer } from 'buffer/' | ||
export const readFile = async (filePath: string): Promise<Buffer> => | ||
(await fs.readFile(filePath)) as unknown as Buffer | ||
export const readFile = async (filePath: string): Promise<Buffer> => { | ||
const { default: fs } = await import('fs-extra') | ||
return (await fs.readFile(filePath)) as unknown as Buffer | ||
} | ||
export const fetchUrl = async (url: string): Promise<Buffer> => | ||
(await fetch(url).buffer()) as unknown as Buffer |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35063
782
12