1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-22 13:37:21 +00:00

Remove HB reference from generic helpers.

This commit is contained in:
hacksalot 2016-02-11 22:06:43 -05:00
parent f87eb46549
commit daeffd27b5
2 changed files with 4 additions and 4 deletions

View File

@ -484,7 +484,7 @@ Generic template helper definitions for HackMyResume / FluentCV.
compare: function(lvalue, rvalue, options) {
var operator, operators, result;
if (arguments.length < 3) {
throw new Error("Handlerbars Helper 'compare' needs 2 parameters");
throw new Error("Template helper 'compare' needs 2 parameters");
}
operator = options.hash.operator || "==";
operators = {
@ -514,7 +514,7 @@ Generic template helper definitions for HackMyResume / FluentCV.
}
};
if (!operators[operator]) {
throw new Error("Handlerbars Helper 'compare' doesn't know the operator " + operator);
throw new Error("Helper 'compare' doesn't know the operator " + operator);
}
result = operators[operator](lvalue, rvalue);
if (result) {

View File

@ -469,7 +469,7 @@ GenericHelpers = module.exports =
###
compare: (lvalue, rvalue, options) ->
if arguments.length < 3
throw new Error("Handlerbars Helper 'compare' needs 2 parameters")
throw new Error "Template helper 'compare' needs 2 parameters"
operator = options.hash.operator || "=="
operators =
'==': (l,r) -> l == r
@ -481,7 +481,7 @@ GenericHelpers = module.exports =
'>=': (l,r) -> l >= r
'typeof': (l,r) -> typeof l == r
if !operators[operator]
throw new Error("Handlerbars Helper 'compare' doesn't know the operator "+operator)
throw new Error("Helper 'compare' doesn't know the operator "+operator)
result = operators[operator]( lvalue, rvalue )
return if result then options.fn(this) else options.inverse(this)