0.34.0 • Published 4 years ago

render-code v0.34.0

Weekly downloads
141
License
-
Repository
github
Last release
4 years ago

render-code takes a carefully formatted subset of JavaScript and renders it as HTML with various symbols and indentation rendered.

Demo

var renderCode = require("./render-code")
var WebSite = require("web-site")
var BrowserBridge = require("browser-bridge")

function demo(arg1, arg2) {
  doSomethingWith(
    "string parameter",[
    "array item 1",
    "array item 2"])
  var thing = new Thing(
    )
  thing.method(
    3003,{
    "key": "value"},
    anotherFunction(
      ).chained(
        toMe))}

var lines = demo.toString().split(/\n/)

var site = new WebSite()
site.start(3003)

site.addRoute(
  "get",
  "/",
  function(request, response) {
    var bridge = new BrowserBridge()
      .forResponse(response)
    renderCode(
      bridge,
      lines)})

Screenshot

Screenshot of the rendered demo code

0.34.0

4 years ago

0.33.0

4 years ago

0.32.0

4 years ago

0.31.0

5 years ago

0.30.0

5 years ago

0.29.0

5 years ago

0.28.0

5 years ago

0.27.0

5 years ago

0.26.0

5 years ago

0.25.0

5 years ago

0.24.0

5 years ago

0.23.0

5 years ago

0.22.0

5 years ago

0.21.0

5 years ago

0.20.0

5 years ago

0.19.0

5 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.0

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago