1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-03 00:41:06 +01:00

feat: introduce two skill-related helpers

This commit is contained in:
hacksalot
2018-02-07 05:55:27 -05:00
parent 38a073b09a
commit c08c5f0fa3
4 changed files with 44 additions and 9 deletions

View File

@ -38,6 +38,14 @@ BlockHelpers = module.exports =
ifHasSkill: ( rez, skill, options ) ->
skUp = skill.toUpperCase()
ret = _.some rez.skills.list, (sk) ->
(skUp.toUpperCase() == sk.name.toUpperCase()) and sk.years
, @
options.fn @ if ret
###*
Emit the enclosed content if the resume has the named
property or subproperty.
@ -55,4 +63,4 @@ BlockHelpers = module.exports =
Return true if either value is truthy.
@method either
###
either: ( lhs, rhs, options ) -> options.fn @ if lhs || rhs
either: ( lhs, rhs, options ) -> options.fn @ if lhs || rhs