node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


Codom - mini functional templating

Codom is a mini functional templating engine. There are only 3 functions. You probably won't use 2 of them.

Getting started

var stuff = co.node('div#content',
              co.node('a#google.linkclass', { href: '' },

stuff is a string:

<div id="content">
  <a class="linkclass" id="google" href="">google!</a>


Easily build abstractions!

function row(columnRenderers, data) {
  var n = 0;
  return co.node('tr',{
    return co.node('td#column' + (++n), fn(data));
function table(meta) {
  var rows ={
    return row(meta.renderers, rowData);
  return co.node("table#myTable", rows);