Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
馃 Merge PR #53794 update(word-extractor): v1 update by @peterblazejewicz
- new methods added - version bump - tests amended morungos/node-word-extractor@0.3.0...1.0.2 Thanks!
- Loading branch information
1 parent
5885a0e
commit 598639c
Showing
2 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
import WordExtractor = require("word-extractor"); | ||
import WordExtractor = require('word-extractor'); | ||
|
||
const extractor = new WordExtractor(); | ||
|
||
let temp: string; | ||
|
||
const doc = extractor.extract('/path/to/file.doc').then(document => { | ||
temp = document.getBody(); | ||
temp = document.getAnnotations(); | ||
temp = document.getEndNotes(); | ||
temp = document.getFootnotes(); | ||
temp = document.getHeaders(); | ||
extractor.extract('/path/to/file.doc').then(document => { | ||
document.getBody(); // $ExpectType string | ||
document.getAnnotations(); // $ExpectType string | ||
document.getEndNotes(); // $ExpectType string | ||
document.getFootnotes(); // $ExpectType string | ||
document.getHeaders(); // $ExpectType string | ||
document.getHeaders(); // $ExpectType string | ||
// $ExpectType string | ||
document.getHeaders({ | ||
includeFooters: false, | ||
}); | ||
document.getFooters(); // $ExpectType string | ||
// $ExpectType string | ||
document.getTextboxes({ | ||
includeBody: false, | ||
includeHeadersAndFooters: false, | ||
}); | ||
}); |