thelounge/client/js/libs/handlebars/equal.js
2016-05-12 16:07:15 +03:00

12 lines
190 B
JavaScript

Handlebars.registerHelper(
"equal", function(a, b, opt) {
a = a.toString();
b = b.toString();
if (a === b) {
return opt.fn(this);
} else {
return opt.inverse(this);
}
}
);