function eachActiveConnection(fn) {
    //var actives = $('.active');
    var checkedIds = {};
    for(peerId in connectedPeers){
      if (!checkedIds[peerId]) {
        var conns = peer.connections[peerId];
        for (var i = 0, ii = conns.length; i < ii; i += 1) {
          var conn = conns[i];
          fn(conn, $(this));
        }
      }
      checkedIds[peerId] = 1;
    };
}//function eachActiveConnection
// Goes through each active peer and calls FN on its connections.
Goes through each active peer and calls FN on its connections.
Goes through each active peer and calls FN on its connections .
function eachActiveConnection(fn) {
    var checkedIds = {};
    for(peerId in connectedPeers){
      if (!checkedIds[peerId]) {
        var conns = peer.connections[peerId];
        for (var i = 0, ii = conns.length; i < ii; i += 1) {
          var conn = conns[i];
          fn(conn, $(this));
        }
      }
      checkedIds[peerId] = 1;
    };
}
function eachActiveConnection ( fn ) { var checkedIds = { } ; for ( peerId in connectedPeers ) { if ( ! checkedIds [ peerId ] ) { var conns = peer . connections [ peerId ] ; for ( var i = 0 , ii = conns . length ; i < ii ; i += 1 ) { var conn = conns [ i ] ; fn ( conn , $ ( this ) ) ; } } checkedIds [ peerId ] = 1 ; } ; }
Goes through each active peer and calls FN on its connections.
Goes through each active peer and calls FN on its connections .
//var actives = $('.active'); //function eachActiveConnection