mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 08:20:11 +00:00
parent
0f65e4c9f3
commit
896b7055c1
14
dist/helpers/generic-helpers.js
vendored
14
dist/helpers/generic-helpers.js
vendored
@ -108,18 +108,22 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
||||
@method section
|
||||
*/
|
||||
section: function(title, options) {
|
||||
var obj;
|
||||
var obj, ret;
|
||||
title = title.trim().toLowerCase();
|
||||
obj = LO.get(this.r, title);
|
||||
ret = '';
|
||||
if (obj) {
|
||||
if (_.isArray(obj)) {
|
||||
if (obj.length) {
|
||||
return options.fn(this);
|
||||
} else {
|
||||
return void 0;
|
||||
ret = options.fn(this);
|
||||
}
|
||||
} else if (_.isObject(obj)) {
|
||||
return (obj.history && obj.history.length) || (obj.sets && obj.sets.length ? options.fn(this) : void 0);
|
||||
if ((obj.history && obj.history.length) || (obj.sets && obj.sets.length)) {
|
||||
ret = options.fn(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -74,12 +74,15 @@ GenericHelpers = module.exports =
|
||||
section: ( title, options ) ->
|
||||
title = title.trim().toLowerCase()
|
||||
obj = LO.get this.r, title
|
||||
ret = ''
|
||||
if obj
|
||||
if _.isArray obj
|
||||
return if obj.length then options.fn(this) else undefined;
|
||||
if obj.length
|
||||
ret = options.fn @
|
||||
else if _.isObject obj
|
||||
return (obj.history && obj.history.length) ||
|
||||
if ( obj.sets && obj.sets.length )
|
||||
then options.fn(this) else undefined
|
||||
if (obj.history && obj.history.length) || (obj.sets && obj.sets.length)
|
||||
ret = options.fn @
|
||||
ret
|
||||
|
||||
###*
|
||||
Emit the size of the specified named font.
|
||||
|
Loading…
Reference in New Issue
Block a user