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:
8
dist/core/fresh-resume.js
vendored
8
dist/core/fresh-resume.js
vendored
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
8
dist/core/jrs-resume.js
vendored
8
dist/core/jrs-resume.js
vendored
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user