build/eoraptor.js
function compile (str, options) {
    var id;
    var render;

    str = str || EMPTY;
    options = options || {};

    id = options.id || str;

    render = eoraptor[id];
    if (render) {
        return render;
    }

    var oTag = options.oTag || OTAG;
    var cTag = options.cTag || CTAG;

    var code = build(parse(str, oTag, cTag));

    render = function (data) {
        var result;
        try {

            result = new Function('data', codePrefix + code)(data);
        } catch(err) {
            console.error('"' +err.message + '" from data and tpl below:');
            console.log(data);
            console.log(str);
        }
        return result;
    };

    render.render = render;
    render.source = 'function (data) {\n' + code + '\n}';
    return eoraptor[id] = render;
}
function compile (str, options) {
    var id;
    var render;

    str = str || EMPTY;
    options = options || {};

    id = options.id || str;

    render = eoraptor[id];
    if (render) {
        return render;
    }

    var oTag = options.oTag || OTAG;
    var cTag = options.cTag || CTAG;

    var code = build(parse(str, oTag, cTag));

    render = function (data) {
        var result;
        try {

            result = new Function('data', codePrefix + code)(data);
        } catch(err) {
            console.error('"' +err.message + '" from data and tpl below:');
            console.log(data);
            console.log(str);
        }
        return result;
    };

    render.render = render;
    render.source = 'function (data) {\n' + code + '\n}';
    return eoraptor[id] = render;
}
function compile ( str , options ) { var id ; var render ; str = str || EMPTY ; options = options || { } ; id = options . id || str ; render = eoraptor [ id ] ; if ( render ) { return render ; } var oTag = options . oTag || OTAG ; var cTag = options . cTag || CTAG ; var code = build ( parse ( str , oTag , cTag ) ) ; render = function ( data ) { var result ; try { result = new Function ( 'data' , codePrefix + code ) ( data ) ; } catch ( err ) { console . error ( '"' + err . message + '" from data and tpl below:' ) ; console . log ( data ) ; console . log ( str ) ; } return result ; } ; render . render = render ; render . source = 'function (data) {\n' + code + '\n}' ; return eoraptor [ id ] = render ; }
to compile a template string to callable render @param {string} str a template string @param {object} options optional @param {string} options.id the unique name for the template @param {string} options.oTag set a one-off opening tag TODO oTag cTag
to compile a template string to callable render