mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-05 01:56:21 +00:00
Remove HB reference from generic helpers.
This commit is contained in:
parent
f87eb46549
commit
daeffd27b5
4
dist/helpers/generic-helpers.js
vendored
4
dist/helpers/generic-helpers.js
vendored
@ -484,7 +484,7 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
|||||||
compare: function(lvalue, rvalue, options) {
|
compare: function(lvalue, rvalue, options) {
|
||||||
var operator, operators, result;
|
var operator, operators, result;
|
||||||
if (arguments.length < 3) {
|
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 || "==";
|
operator = options.hash.operator || "==";
|
||||||
operators = {
|
operators = {
|
||||||
@ -514,7 +514,7 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!operators[operator]) {
|
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);
|
result = operators[operator](lvalue, rvalue);
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -469,7 +469,7 @@ GenericHelpers = module.exports =
|
|||||||
###
|
###
|
||||||
compare: (lvalue, rvalue, options) ->
|
compare: (lvalue, rvalue, options) ->
|
||||||
if arguments.length < 3
|
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 || "=="
|
operator = options.hash.operator || "=="
|
||||||
operators =
|
operators =
|
||||||
'==': (l,r) -> l == r
|
'==': (l,r) -> l == r
|
||||||
@ -481,7 +481,7 @@ GenericHelpers = module.exports =
|
|||||||
'>=': (l,r) -> l >= r
|
'>=': (l,r) -> l >= r
|
||||||
'typeof': (l,r) -> typeof l == r
|
'typeof': (l,r) -> typeof l == r
|
||||||
if !operators[operator]
|
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 )
|
result = operators[operator]( lvalue, rvalue )
|
||||||
return if result then options.fn(this) else options.inverse(this)
|
return if result then options.fn(this) else options.inverse(this)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user