Showing 7 of 62 total issues
Book
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Book {
static find(id, filetype) {
return new Promise((resolve, reject) => {
BookModel.findOne({ where: { uid: id } }).then((bookModel) => {
if (!bookModel) {
HtmlProcessor
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class HtmlProcessor {
/*
* Image extraction
*/
File html-processor.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const path = require('path');
const Url = require('url');
const cheerio = require('cheerio');
const stringDirection = require('string-direction');
File book.js
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
const fs = require('fs');
const shortid = require('shortid');
File book-services.js
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
const { exec } = require('child_process');
const request = require('request-promise').defaults({ gzip: true });
const { tidy } = require('htmltidy2');
Function writeEpub
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
writeEpub() {
this._ebook = Book.getEpubWriter(this.getMetadata());
this.getSections().forEach((section) => {
if (section.title && section.xhtml) {
Function bookFromBody
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bookFromBody(body) {
return new Promise((resolve) => {
const sections = [];
if (body.urls) {
log.verbose('Urls request');