don't copy __ metas

This commit is contained in:
AJ ONeal 2015-12-19 18:46:14 -08:00
parent ded286de61
commit 5834541c02
1 changed files with 10 additions and 0 deletions

View File

@ -67,6 +67,16 @@ function parsePythonConf(str, cb) {
// we want to be able to rewrite the file with comments, etc // we want to be able to rewrite the file with comments, etc
obj.__keys = keys; obj.__keys = keys;
obj.__lines = lines; obj.__lines = lines;
obj.toJSON = function () {
var me = this;
var copy = {};
Object.keys(me).forEach(function (k) {
if ('__' !== k.slice(0, 2)) {
copy[k] = me[k]
}
});
return copy;
};
cb(null, obj); cb(null, obj);
} }