Skip to content

0.3.0 with

Ivan S Glazunov edited this page Feb 20, 2015 · 2 revisions

sources/with

Templates.with

Good way to add into the context of all possible module tools.

Added: sync async Renderer data Data xml doctypes Doctype singles[string] Single doubles[string] Double Mixin mixin mixins[string] Module

with (T.with) {
    console.log(sync(function() { return 123; })); // 123
    console.log(async(function(callback) { callback(null, 123); })); // 123
    console.log(data(123)); // 123
    console.log(doctypes.html)); // <!DOCTYPES html>
    console.log(img)); // <img/>
    console.log(div)); // <div/>
    var m = mixin(function(a, b, c) { return a+b+c; });
    console.log(m(1, 2, 3));
}
Clone this wiki locally