summaryrefslogtreecommitdiff
path: root/app/node_modules/oktemplate/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/node_modules/oktemplate/index.js')
-rw-r--r--app/node_modules/oktemplate/index.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/node_modules/oktemplate/index.js b/app/node_modules/oktemplate/index.js
index 502d2cf..75d7e6f 100644
--- a/app/node_modules/oktemplate/index.js
+++ b/app/node_modules/oktemplate/index.js
@@ -1,10 +1,26 @@
var fs = require('fs');
var path = require('path');
var glob = require('glob');
+var stringify = require('json-to-html');
var LiquidEngine = require('liquid-node').Engine;
var liquid = new LiquidEngine();
/**
+ * Add any custom liquid filters here.
+ */
+liquid.registerFilters({
+
+ /**
+ * Return a string formatted version of a JSON object.
+ * Useful for quick debugging of template data.
+ */
+ stringify: function(obj) {
+ return '<pre>' + stringify(obj) + '</pre>';
+ }
+
+});
+
+/**
* Manages templates. Only supports Mustache currently/
*/
function OKTemplateRepo(options) {