herje

Make HTML out of JSON

npm install herje
2 downloads in the last week
5 downloads in the last month

Herje

Just another tiny JsonML renderer. Runs in node and in the browser.

Turns

['h1', ['a', { 'href': 'http:die-tf.de' }, 'TF']]

into

<h1><a href="http://die-tf.de">TF</a></h1>

Refer to http://www.jsonml.org/

Usage

// render to string
Herje(template).toString();

// append to dom node
Herje(template).appendTo(document.getElementById('main'));

// iterate over each entry
Herje(template, function(node) {
  // manipulate node
  return node;
});

(c) 2013 Johannes J. Schmidt

MIT license

npm loves you