2017-03-18 09:21:18 +00:00
|
|
|
"use strict";
|
|
|
|
|
2016-12-18 15:53:28 +00:00
|
|
|
module.exports = function(a, b, opt) {
|
2017-12-22 01:09:12 +00:00
|
|
|
if (arguments.length !== 3) {
|
|
|
|
throw new Error("Handlebars helper `equal` expects 3 arguments");
|
|
|
|
}
|
|
|
|
|
2016-12-18 15:53:28 +00:00
|
|
|
a = a.toString();
|
|
|
|
b = b.toString();
|
2017-12-22 01:09:12 +00:00
|
|
|
|
2016-12-18 15:53:28 +00:00
|
|
|
if (a === b) {
|
|
|
|
return opt.fn(this);
|
2014-07-20 19:49:44 +00:00
|
|
|
}
|
2016-12-18 15:53:28 +00:00
|
|
|
|
|
|
|
return opt.inverse(this);
|
|
|
|
};
|