don't copy __ metas
This commit is contained in:
parent
ded286de61
commit
5834541c02
10
index.js
10
index.js
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue