Created
January 10, 2014 12:44
-
-
Save chenxsan/8351314 to your computer and use it in GitHub Desktop.
Handlebars.js 预编译的结果
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var template = Handlebars.template, | |
templates = Handlebars.templates = Handlebars.templates || {}; | |
templates['person'] = template(function (Handlebars, depth0, helpers, partials, data) { | |
this.compilerInfo = [4, '>= 1.0.0']; | |
helpers = this.merge(helpers, Handlebars.helpers); | |
data = data || {}; | |
var buffer = "", | |
stack1, helper, functionType = "function", | |
escapeExpression = this.escapeExpression; | |
buffer += "<table>\n <tr>\n <td>This is "; | |
if (helper = helpers.firstname) { | |
stack1 = helper.call(depth0, { | |
hash: {}, | |
data: data | |
}); | |
} else { | |
helper = (depth0 && depth0.firstname); | |
stack1 = typeof helper === functionType ? helper.call(depth0, { | |
hash: {}, | |
data: data | |
}) : helper; | |
} | |
buffer += escapeExpression(stack1) + " "; | |
if (helper = helpers.lastname) { | |
stack1 = helper.call(depth0, { | |
hash: {}, | |
data: data | |
}); | |
} else { | |
helper = (depth0 && depth0.lastname); | |
stack1 = typeof helper === functionType ? helper.call(depth0, { | |
hash: {}, | |
data: data | |
}) : helper; | |
} | |
buffer += escapeExpression(stack1) + "</td>\n </tr>\n</table>\n"; | |
return buffer; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment