lib/pubsub.js
function cleanup(client) {
  if(client.pubsub
    && client.pubsub.channels
    && client.pubsub.patterns
    && !client.pubsub.channels.length
    && !client.pubsub.patterns.length) {
    client.pubsub = null;
  }
}
function cleanup(client) {
  if(client.pubsub
    && client.pubsub.channels
    && client.pubsub.patterns
    && !client.pubsub.channels.length
    && !client.pubsub.patterns.length) {
    client.pubsub = null;
  }
}
function cleanup ( client ) { if ( client . pubsub && client . pubsub . channels && client . pubsub . patterns && ! client . pubsub . channels . length && ! client . pubsub . patterns . length ) { client . pubsub = null ; } }
Clean pubsub references on the client when it has no
more channels or patterns.
Clean pubsub references on the client when it has no more channels or patterns .