UNPKG

fetch-fic

Version:

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

9 lines (7 loc) 254 B
'use strict' const promisify = use('promisify') const rtfToHTML = promisify(require('@iarna/rtf-to-html').fromString) module.exports = async rtf => { const html = await rtfToHTML(rtf) return '<!DOCTYPE html>' + html.replace(/<[/](\w+)><\1>/g, '') }