
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
epub-generator
Advanced tools
Generate simple EPUB books with simple API in Node.js.
EpubGenerator = require('epub-generator')
Create and return an generator
. The generator is also a stream. You can pipe it to another stream (e.g. the stream returned by fs.createWriteStream
).
You need to listen to writableStream's events to get the generation status, such as drain
, error
, finish
, etc.
Options (all optional):
uuid
an identifier of the book, will generate one if not giventitle
the book's title, default to blanklanguage
language of the book, will try to detect system's default language or set to "en" if not givendate
the modification date, default to the current dateauthor
author of the bookdescription
some descriptionrights
rights informationcover
the cover image path, add the image using methods belowAdd data
as a file in epub bundle. The data
can be a string, buffer, or stream.
path
is the file's path in epub bundle.
Hint: you can use XHTML, CSS and common images in epub bundle.
Meta (all optional):
mimetype
the mimetype to override the default mimetypetoc
whether this file should be added to TOC (table of contents)title
the title, used in TOCFinish adding data. The callback
is added to the finish
event of the stream.
MIT
FAQs
Generate simple EPUB books with simple API in Node.js.
We found that epub-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.