mirror of
https://github.com/thelounge/thelounge
synced 2024-12-02 00:39:19 +00:00
16 lines
269 B
JavaScript
16 lines
269 B
JavaScript
"use strict";
|
|
|
|
module.exports = function(a, b, opt) {
|
|
if (arguments.length !== 3) {
|
|
throw new Error("Handlebars helper `equal` expects 3 arguments");
|
|
}
|
|
|
|
a = a.toString();
|
|
b = b.toString();
|
|
|
|
if (a === b) {
|
|
return opt.fn(this);
|
|
}
|
|
|
|
return opt.inverse(this);
|
|
};
|