julien-c / epub

node.js epub reader
https://www.npmjs.com/package/epub
Other
333 stars 307 forks source link

Add callbacks #14

Closed mawi12345 closed 9 years ago

mawi12345 commented 9 years ago

I am currently refactoring the whole lib to add callbacks. One big benefit of this the the methods are now decoupled (getMimeType does not call getRootFiles...)

I have done this to be able to unit test one method (preparation for the xml2js option update).

Please have a look at https://github.com/mawi12345/epub/commit/a20e6fd4c52055f668989822bdc3037c40a6d373 and let me know what you think about the changes.

julien-c commented 9 years ago

Sorry for the late response @mawi12345 – yes, this makes sense.