From 5834541c023af6f7f8b61f399afd11deb82d5a9d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 19 Dec 2015 18:46:14 -0800 Subject: [PATCH] don't copy __ metas --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index e43b8c0..1273206 100644 --- a/index.js +++ b/index.js @@ -67,6 +67,16 @@ function parsePythonConf(str, cb) { // we want to be able to rewrite the file with comments, etc obj.__keys = keys; 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); }