Fix the docs so that returned doc is actually a promise
See original GitHub issuehi,im using this package for a test,and i got this problem
`F:\parseWord\app.js:4 var body = doc.getBody(); ^
TypeError: doc.getBody is not a function at Object.<anonymous> (F:\parseWord\app.js:4:16) at Module._compile (module.js:409:26) at Object.Module._extensions…js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3`
code:
`var WordExtractor = require(“word-extractor”); var extractor = new WordExtractor(); var doc = extractor.extract(“./testDocccccc.doc”) var body = doc.getBody();
console.log(body)`
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Promise - JavaScript - MDN Web Docs
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
Read more >How to specify resolution and rejection type of the promise in ...
I was wondering about something similar. How do I document the return type of a function that can return multiple different things based...
Read more >We have a problem with promises - PouchDB
The problem is that the first function is actually returning undefined , meaning that the second function isn't waiting for db.remove() to be ......
Read more >'request' with Promise - GitHub
GitHub - request/request-promise: The simplified HTTP request client 'request' ... { return resolveWithFullResponse ? response : body; } you may now set the ......
Read more >Realtime Database triggers | Cloud Functions for Firebase
You must return a Promise when performing asynchronous tasks inside a Functions such as // writing to the Firebase Realtime Database.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Do you have a test/public version of this .doc file you could share with me, then I can take a look? You send directly to stuart@morungos.com if you prefer.
Good for finding this. If you can make enough of a test case that I can get it, I’d be happy to look into this. It’s very possible, given that the encodings used inside both Word and JavaScript are neither especially standard, and there could well be issues that have fallen in between.
I’d be happy to fix if you can find a small enough test file that I can understand, although it might be best flagging that as a new issue, and I’ll use this to fix the docs