thelounge/client/js/libs/handlebars/diff.js
2014-10-04 12:47:27 -07:00

12 lines
172 B
JavaScript

var diff;
Handlebars.registerHelper(
"diff", function(a, opt) {
if (a != diff) {
diff = a;
return opt.fn(this);
} else {
return opt.inverse(this);
}
}
);