-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hasDRM()
and update typings
#44
Conversation
export = EPub; | ||
import { EventEmitter } from 'events' | ||
|
||
declare class EPub extends EventEmitter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was auto-formatted with prettier, sorry about that. It happens by default in my editor, so it happened at one point while editing. If it's a sticking point, i'm happy to go through and un-format it.
export = EPub | ||
|
||
declare namespace EPub { | ||
export interface TocElement { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern allows things like:
import EPub = require('epub')
import { TocElement } from 'epub'
const func = (book: EPub, chapter: TocElement) => ...
Looks like there's a test failure. Maybe try updating the |
LGTM, thanks! |
(if you find a way to fix the tests that'd be awesome) |
sure, I'll take a look! |
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!