Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (48 sloc) 1.3 KB


build status dependency status

browser support

Produces a valid html5 document from JsonML


var doc = require('jsonml-document')

var docString = doc(["html", [
    ["head", [
        ["meta", { charset: "utf-8" }],
        ["title", "Test document"],
        ["link", { rel: "stylesheet", href: "/css/main" }]
    ["body", { class: "main" }, [
        ["p", "This is a test document"],
        ["script", { src: "/js/main" }]

/* docString:

<!DOCTYPE html>
        <meta charset="utf-8"></meta>
            Test document
        <link rel="stylesheet" href="/css/main"></link>
    <body class="main">
            This is a test document
        <script src="/js/main"></script>


npm install jsonml-document


  • Matt-Esch

MIT Licenced

Jump to Line
Something went wrong with that request. Please try again.