harshankur / officeParser

A Node.js library to parse text out of any office file. Currently supports docx, pptx, xlsx and odt, odp, ods..
MIT License
150 stars 20 forks source link

feat: add functions support native promise #5

Closed eerFun closed 3 years ago

eerFun commented 3 years ago

I wrote a native ES6+ promise wrapper around all functions in 'promise.js'. And, then import them in main file for exporting from the module.

Issue: #4 functions support native ES6+ promise

harshankur commented 3 years ago

Hey, I am sorry for my late reply. Thank you for your contribution. I have gone through your code. I like your idea of converting callbacks to promise versions. I, however, find that your code produces a cyclical import problem with both files importing from each other.

Try putting all your code from promise.js into officeparser.js and remove all the importing code and it should solve the issue.

If you want to be added as a contributor, change as above and send me another pull request. Or if you just want the feature added into the library, let me know and I will add it myself and update the package.

Let me know.