Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

word-extractor

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

word-extractor

Node.js package to read Word .DOC files

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33K
increased by5.52%
Maintainers
1
Weekly downloads
 
Created
Source

word-extractor

Read data from a Word document using node.js

Why use this module?

There are a fair number of npm components which can extract text from Word .doc files, but they all appear to require some external helper program, and involve either spawning a process or communicating with a persistent one. That raises the installation and deployment burden as well as the runtime one.

This module is intended to provide a much faster way of reading the next from a Word file, without leaving the node.js environment.

How do I use this module?
var WordExtractor = require("word-extractor");
var extractor = new WordExtractor();
var doc = extractor.extract("file.doc")
var body = doc.getBody();

The object returned from the extract() method is a document object, and provides several views onto different parts of the document contents.

Methods

WordExtractor#extract(file)

Main method to open a Word file and retrieve the data. Returns a Document.

Document#getBody()

Retrieves the content text from a Word document. This will handle UNICODE characters correctly, so if there are accented or non-Latin-1 characters present in the document, they'll show as is in the returned string.

More methods will be available in future releases.

License

Copyright (c) 2016. Stuart Watt.

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 14 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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