define([
    '/common/hyperjson.js',
    '/common/hyperscript.js'
], function (hyperjson, hyperscript) {
    // complain if you don't find the required APIs
    if (!(hyperjson && hyperscript)) { throw new Error(); }

    // Generate a matrix of conversions
    /*
        convert.dom.to.hjson, convert.hjson.to.dom,
        convert.dom.to.vdom, convert.vdom.to.dom,

        and of course, identify functions in case you try to
        convert a datatype to itself
    */
    var convert = (function () {
        var Self = function (x) {
                return x;
            },
            methods = {
                dom:{
                    dom: Self,
                    hjson: hyperjson.fromDOM
                },
                hjson:{
                    hjson: Self,
                    dom: function (H) {
                        // hyperjson.fromDOM,
                        return hyperjson.callOn(H, hyperscript);
                    }
                }
            },
            convert = {};
        Object.keys(methods).forEach(function (method) {
            convert[method] = { to: methods[method] };
        });
        return convert;
    }());

    convert.core = {
        hyperjson: hyperjson,
        hyperscript: hyperscript
    };
    return convert;
});

@@ -695,16 +695,159 @@
 .fromDOM
+,%0A                    vdom: function (D) %7B%0A                        return hyperjson.callOn(hyperjson.fromDOM(D), vdom.h);%0A                    %7D
 %0A       
@@ -1066,16 +1066,140 @@
 cript);%0A
+                    %7D,%0A                    vdom: function (H) %7B%0A                        return hyperjson.callOn(H, vdom.h);%0A
         

Revert "remove broken functions from convert module"