remove leading underscore, fix next call in mongosave

This commit is contained in:
Wolfgang Hottgenroth
2017-08-24 15:51:34 +02:00
parent a0a922f851
commit 25116aae89
14 changed files with 230 additions and 170 deletions

5
dist/utils.js vendored
View File

@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
function jsonPrepaper(obj, hideKeys) {
let dup = {};
for (let key in obj) {
if ((hideKeys.indexOf(key) == -1) && !((key[0] == "_") && (key[1] == "_"))) {
let dkey = (key[0] == "_") ? key.slice(1) : key;
dup[dkey] = obj[key];
if ((hideKeys.indexOf(key) == -1) && !(key[0] == "_")) {
dup[key] = obj[key];
}
}
return dup;