this.tmpl=function tmpl(str, data){// Figure out if we're getting a template, or if we need to// load the template - and be sure to cache the result.var fn =!/\W/.test(str)? cache[str]= cache[str]|| tmpl(document.getElementById(str).innerHTML):

// Generate a reusable function that will serve as a template// generator (and which will be cached).newFunction("obj","var p=[],print=function(){p.push.apply(p,arguments);};"+

// Introduce the data as local variables using with(){}"with(obj){p.push('"+

this.tmpl2=function tmpl(str, data){// Figure out if we're getting a template, or if we need to// load the template - and be sure to cache the result.var fn =!/\W/.test(str)? cache[str]= cache[str]|| tmpl(document.getElementById(str).innerHTML):

// Generate a reusable function that will serve as a template// generator (and which will be cached).newFunction("data","var p=[];"+

/* TODO: * a way to prevent a delimiter (e.g. ", ") appearing last in a loop template * Sorted constructor for auto-sorting arrays - used for parsers -> two parsers are added, one for identifying and parsing single-tokens and one for open/close tokens - the parsers then create two new Sorted instance, one for single-token plugins and one for open/close token plugins*/