Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

epubstream

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

epubstream

Epub

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

epubstream

DESCRIPTION

Epubstream is a module for generating epub2 files directly to a writable stream.

USAGE

var epubstream = require('epubstream'),
    fs = require('fs');

// Create epub and provide the minimum possible metadata
var epub = epubstream.createEpub({
    title: 'Sample',
    nav: [{ label: 'foo', content: 'foo.html' }]
});

// Start piping the epub to a file
epub.pipe(fs.createWriteStream('sample.epub'));

// Add the file foo.xhtml to the archive
epub.addFile(fs.createReadStream('foo.xhtml'), 'foo.xhtml', function() {
    // Write the XML files required for epub (ncx/opf/ocf)
    epub.finalize(function(b) { console.log('%d bytes', b); });
});

LIMITATIONS

Files added to an epub are passed through unmodified, so you must ensure that your XHTML files comply with the Epub2 specification.

FAQs

Package last updated on 14 Feb 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc