phantomjs/bridge.js
function decycle(key, val) {
      if (typeof val === 'object' && val !== null) {
        if (cache.indexOf(val) >= 0) return;
        cache.push(val);
      }
      return val;
    }
function decycle(key, val) {
      if (typeof val === 'object' && val !== null) {
        if (cache.indexOf(val) >= 0) return;
        cache.push(val);
      }
      return val;
    }
function decycle ( key , val ) { if ( typeof val === 'object' && val !== null ) { if ( cache . indexOf ( val ) >= 0 ) return ; cache . push ( val ) ; } return val ; }
Safe stringifying of cyclical JSON
Safe stringifying of cyclical JSON