julien-c / epub

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

Add `hasDRM()` and update typings #44

Closed xavdid closed 4 years ago

xavdid commented 4 years ago

Hi there!

This PR adds one function: hasDRM() it checks for the existence of the encryption file, and if it's there, the book is protected. I didn't add a test here, but the functionality is tested where I use it, here.

I also updated your typescript definitions. I was following this blueprint. I also updated the triple-slash directive per these instructions.

Thanks a bunch!

xavdid commented 4 years ago

Looks like there's a test failure. Maybe try updating the @types/node dependency: https://github.com/microsoft/TypeScript/issues/32333

julien-c commented 4 years ago

LGTM, thanks!

julien-c commented 4 years ago

(if you find a way to fix the tests that'd be awesome)

xavdid commented 4 years ago

sure, I'll take a look!