MCPcopy
hub / github.com/BorisMoore/jquery-tmpl / R

Function R

tests/core.js:13–23  ·  view source on GitHub ↗
( tmpl, data )

Source from the content-addressed store, hash-verified

11};
12
13var R = function ( tmpl, data ) {
14 try {
15 return jQuery.tmpl( tmpl, data ).text();
16 }
17 catch ( e ) {
18 if ( typeof e === 'string' ) {
19 return 'ERROR: ' + e;
20 }
21 return e;
22 }
23};
24
25function test_handler( test_name, res, exp ) {
26 var is_err = ($.isFunction(exp) && exp.prototype instanceof Error);

Callers 1

core.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected