lib/expressSitemapHtml.js
function sitemap(app) {
    let html
    return (req, res) => {
        if(!html) html = view(parseRoutes(app))
        res.set({
            'Content-Type': 'text/html',
            'Content-Length': html.length
        })
        res.send(html)
    }
}
function sitemap(app) {
    let html
    return (req, res) => {
        if(!html) html = view(parseRoutes(app))
        res.set({
            'Content-Type': 'text/html',
            'Content-Length': html.length
        })
        res.send(html)
    }
}
function sitemap ( app ) { let html return ( req , res ) => { if ( ! html ) html = view ( parseRoutes ( app ) ) res . set ( { 'Content-Type' : 'text/html' , 'Content-Length' : html . length } ) res . send ( html ) } }
Builds an express middleware that renders an HTML sitemap based
on the routes of app parameter.
@param {Express} app An express instance
Builds an express middleware that renders an HTML sitemap based on the routes of app parameter .