X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/idiomatic.git/blobdiff_plain/682a7215ae646bc71baf0be528b9c7d55b1cb445..f0a44e8482fdfa29b5a32d6a407509efe9984e3c:/index.js?ds=inline diff --git a/index.js b/index.js index 18f87de..020a168 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,14 @@ async function load(file) { // P A G E S -const style = '' +const style = title => ` + + â ${title} â` const app = express() app.get('/index', async (req,res,next) => { @@ -33,10 +40,10 @@ app.get('/index', async (req,res,next) => { const result = `
${reductions.size()} non-terminals
${reductions.total()} reductions
-
${reductions.tally()
- .map(([k,v]) => `${v} ${link(k)}`)
- .join("
")}`
- res.send(style+result);
+
| ${v} | ${link(k)}`) + .join("\n")} |
${lits.size()} uniques
${lits.total()} total
-
${lits.tally()
- .map(([k,v]) => `${v} ${escape(k)}`)
- .join("
")}`
- res.send(style+result)
+
| ${v} | ${escape(k)}`) + .join("\n")} |
${JSON.stringify(req.query,null,2)}${list.join("| ${v} | ${k}`).join("\n")} |
${escape(JSON.stringify(hit,omit,2))}`)
+ ${escape(JSON.stringify(hit,omit,2))}`)
}
}
visitor.wander(mods,doit)
- res.send(style+`${JSON.stringify(req.query,null,2)}${result.join("