Socket
Socket
Sign inDemoInstall

office-text-extractor

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

office-text-extractor - npm Package Compare versions

Comparing version 3.4.0-beta.1 to 3.4.0-beta.2

3

package.json
{
"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
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