From 85d00a501e6b1c741b7f18e65c3504f2c5ceaeac Mon Sep 17 00:00:00 2001 From: Sahab Yazdani Date: Sun, 13 Nov 2011 17:03:48 -0500 Subject: [PATCH] Reorder the functions in terms of importance. --- mustache.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/mustache.js b/mustache.js index de28b76..3c1ea9c 100644 --- a/mustache.js +++ b/mustache.js @@ -628,18 +628,9 @@ var Mustache = (function(undefined) { name: "mustache.js", version: "0.5.1-vcs", - /* - Turns a template and view into HTML + /* + Turns a template into a JS function */ - to_html: function(template, view, partials, send_func) { - var program = Mustache.compile(template, partials), - result = program(view, send_func); - - if (!send_func) { - return result; - } - }, - compile: function(template, partials) { var p = {}; if (partials) { @@ -665,6 +656,18 @@ var Mustache = (function(undefined) { } }, + /* + Turns a template and view into HTML + */ + to_html: function(template, view, partials, send_func) { + var program = Mustache.compile(template, partials), + result = program(view, send_func); + + if (!send_func) { + return result; + } + }, + Error: MustacheError }); })();