1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-09-10 16:31:58 +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

@@ -50,18 +50,7 @@ class JRSResume extends AbstractResume
opts = opts || { };
# Ignore any element with the 'ignore: true' or 'private: true' designator.
that = this
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
# Extend resume properties onto ourself.
extend true, this, scrubbed