lib/middleware/common.js
Function createServeFile
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createServeFile (fs, directory, config) {
const cache = Object.create(null)
return function (filepath, rangeHeader, response, transform, content, doNotCache) {
let responseData
Avoid too many return
statements within this function. Open
Open
return 200 // All other states, ignore