LT-67 Creating utility helpers for lesiontracker package and implementing servers listing

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2016-08-04 16:48:26 +02:00
1 parent fd5e7dd2f4
commit d9367cf200
9 files changed
+150 -75

No files matched your search

@@ -0,0 +1,14 @@
Template.registerHelper("instance", function() {
return Template.instance();
});
Template.registerHelper("extend", function(object, extendedProperties){
const result = {};
for (let i=0; i<arguments.length; i++) {
let current = arguments[i];
if (typeof current !== "object") continue;
current instanceof Spacebars.kw && (current = current.hash);
_.extend(result, current);
}
return result;
});