Gathering detailed insights and metrics for @lambda121/word-extractor
Gathering detailed insights and metrics for @lambda121/word-extractor
Gathering detailed insights and metrics for @lambda121/word-extractor
Gathering detailed insights and metrics for @lambda121/word-extractor
npm install @lambda121/word-extractor
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
70 Commits
3 Branches
1 Contributors
Updated on Dec 05, 2019
Latest Version
1.0.0
Package Id
@lambda121/word-extractor@1.0.0
Unpacked Size
38.59 kB
Size
9.88 kB
File Count
15
NPM Version
6.4.1
Node Version
10.15.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
What's different?
I needed buffer support
but didn't want to deal with coffeescript so I modified the repo a bit. The
main public change is the module is now an object with two methods fromFile
and fromBuffer
. I also removed 'bluebird' so the returned promises
are native.
Read data from a Word document using node.js
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 text from a Word file, without leaving the node.js environment.
1yarn add @gmr-fms/word-extractor 2 3# Or using npm... 4npm install @gmr-fms/word-extractor
const extract = require('word-extractor');
extract.fromFile('file.doc').then(doc => {
console.log(doc.getBody());
});
The object returned from the extract()
method is a promise that resolves to a
document object, which then provides several views onto different parts of the
document contents.
extract#fromFile(filePath) => Promise<Document>
extract#fromBuffer(buf) => Promise<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.
Document#getFootnotes()
Retrieves the footnote 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.
Document#getHeaders()
Retrieves the header and footer 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.
Document#getAnnotations()
Retrieves the comment bubble 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.
Copyright (c) 2016-2017. Stuart Watt.
Licensed under the MIT License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More