src/index.js
function isClosed(connId) {
  const connObj = connStatus[connId];
  return (connObj && Object.keys(connObj).length === 0);
}
function isClosed(connId) {
  const connObj = connStatus[connId];
  return (connObj && Object.keys(connObj).length === 0);
}
function isClosed ( connId ) { const connObj = connStatus [ connId ] ; return ( connObj && Object . keys ( connObj ) . length === 0 ) ; }
we use a global to track connection state, get method for it
we use a global to track connection state get method for it