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

parseJSON has been modified to always include private fields if not otherwise instructed. This is to ensure back-compatibility. The BUILD command instead, excludes private fields by default

This commit is contained in:
Daniele Rapagnani
2016-02-14 21:50:13 +01:00
parent fed59b704e
commit 664eea752f
8 changed files with 71 additions and 57 deletions

View File

@ -55,18 +55,7 @@ class FreshResume extends AbstractResume
# Ignore any element with the 'ignore: true' or 'private: true' designator.
that = @
traverse = require 'traverse'
ignoreList = []
privateList = []
scrubbed = traverse( rep ).map ( x ) ->
if !@isLeaf
if @node.ignore == true || @node.ignore == 'true'
ignoreList.push this.node
@remove()
else if (@node.private == true || @node.private == 'true') && !opts?.private
privateList.push @node
@remove()
{ scrubbed, ignoreList, privateList } = @scrubResume rep, opts
# Now apply the resume representation onto this object
extend( true, @, scrubbed );