UNPKG

fetch-fic

Version:

Package up delicious, delicious fanfic from various sources into epub ebooks ready for reading in your ereader of choice.

10 lines (8 loc) 289 B
'use strict' module.exports = chapterFilename const filenameize = require('./filenameize.js') function chapterFilename (chapter) { const index = 1 + chapter.order const name = chapter.name || `Chapter ${index}` return chapter.filename || filenameize(`chapter-${name}`) + '.xhtml' }