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

Implemented private fields that can be included or excluded with cli switch

This commit is contained in:
Daniele Rapagnani
2016-02-14 19:15:47 +01:00
parent 3cf850ea0e
commit fed59b704e
14 changed files with 57 additions and 22 deletions

View File

@ -77,15 +77,19 @@ Definition of the FRESHResume class.
*/
FreshResume.prototype.parseJSON = function(rep, opts) {
var ignoreList, ref, scrubbed, that, traverse;
var ignoreList, privateList, ref, scrubbed, that, traverse;
that = this;
traverse = require('traverse');
ignoreList = [];
privateList = [];
scrubbed = traverse(rep).map(function(x) {
if (!this.isLeaf && this.node.ignore) {
if (!this.isLeaf) {
if (this.node.ignore === true || this.node.ignore === 'true') {
ignoreList.push(this.node);
return this.remove();
} else if ((this.node["private"] === true || this.node["private"] === 'true') && !(opts != null ? opts["private"] : void 0)) {
privateList.push(this.node);
return this.remove();
}
}
});

View File

@ -71,16 +71,20 @@ Definition of the JRSResume class.
*/
JRSResume.prototype.parseJSON = function(rep, opts) {
var ignoreList, ref, scrubbed, that, traverse;
var ignoreList, privateList, ref, scrubbed, that, traverse;
opts = opts || {};
that = this;
traverse = require('traverse');
ignoreList = [];
privateList = [];
scrubbed = traverse(rep).map(function(x) {
if (!this.isLeaf && this.node.ignore) {
if (!this.isLeaf) {
if (this.node.ignore === true || this.node.ignore === 'true') {
ignoreList.push(this.node);
return this.remove();
} else if ((this.node["private"] === true || this.node["private"] === 'true') && !(opts != null ? opts["private"] : void 0)) {
privateList.push(this.node);
return this.remove();
}
}
});