CompositeJs

A JavaScript library to generate HTML view by JSON.
Hje Hyper-JSON Engine (Hje)
provides a way to describe the view by JavaScript with event and binding. It can render to HTML or customized view by the description model.

Installation

Package   |   Get details >
>npm i hje

Features

To HTML
Convert the description in JSON to DOMs.
You can convert a JSON model to HTML view part. Following is a sample.
import * as Hje from 'hje';

let ele = document.createElement("div");
document.body.appendChild(ele);

Hje.render(ele, {
  props: {
    type: "circle",
  },
  style: {
    "color": "#808080", "font-size": "14px"
  },
  on: {
    click(ev) { console.log("ul click", ev); }
  },
  children: [
    {
      tagName: "ul",
      children: ["ABCDEFG", "HIJKLMN", "OPQ RST", "UVW XYZ"]
        .map(ele => ({ tag: "li", children: ele }))
    }
  ]
});

Source

GitHub