// Safe toJSON module.exports = function getSafe (self, uuid) { if (typeof self === 'object' || typeof self === 'function') var safe = {} if (Array.isArray(self)) var safe = [] var recurse = [] Object.defineProperty(self, uuid, {}) var attrs = Object.keys(self).filter(function (i) { if (i === uuid) return false if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true return !(Object.getOwnPropertyDescriptor(self[i], uuid)) }) for (var i=0;i