code: function destroyCircular(from, seen) {
  	var to = Array.isArray(from) ? [] : {};
  
  	seen.push(from);
  
  	for (var _iterator = Object.keys(from), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  		var _ref;
  
  		if (_isArray) {
  			if (_i >= _iterator.length) break;
  			_ref = _iterator[_i++];
  		} else {
  			_i = _iterator.next();
  			if (_i.done) break;
  			_ref = _i.value;
  		}
  
  		var key = _ref;
  
  		var value = from[key];
  
  		if (typeof value === 'function') {
  			continue;
  		}
  
  		if (!value || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') {
  			to[key] = value;
  			continue;
  		}
  
  		if (seen.indexOf(from[key]) === -1) {
  			to[key] = destroyCircular(from[key], seen.slice(0));
  			continue;
  		}
  
  		to[key] = '[Circular]';
  	}
  
  	if (typeof from.name === 'string') {
  		to.name = from.name;
  	}
  
  	if (typeof from.message === 'string') {
  		to.message = from.message;
  	}
  
  	if (typeof from.stack === 'string') {
  		to.stack = from.stack;
  	}
  
  	return to;
  }
docs: https://www.npmjs.com/package/destroy-circular