src/middleware/missing.js
Function exports
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (spec) {
let defaultErrorContent = undefined;
if (spec.errorPage) {
defaultErrorContent = fs.readFileSync(spec.errorPage, "utf8");
}