lib/index.js
/**
 * Expose the Redux store in a background page to other parts of an extension.
 *
 * @param {object} store - The Redux store to expose.
 * @param {Function} addConnectListener - A function that will repeatedly call
 *     a given callback with a newly connected port. If not supplied, an
 *     appropriate default is used.
 * @param {Function} disconnectCallback - A function that will be called when
 *     the port disconnects with the disconnected port and the store. This is
 *     useful for doing state cleanup if necessary.
 */
Expose the Redux store in a background page to other parts of an extension.
@param {object} store - The Redux store to expose.
@param {Function} addConnectListener - A function that will repeatedly call
a given callback with a newly connected port. If not supplied, an
appropriate default is used.
@param {Function} disconnectCallback - A function that will be called when
the port disconnects with the disconnected port and the store. This is
useful for doing state cleanup if necessary.
Expose the Redux store in a background page to other parts of an extension . @param { object } store - The Redux store to expose . @param { Function } addConnectListener - A function that will repeatedly call a given callback with a newly connected port . If not supplied an appropriate default is used . @param { Function } disconnectCallback - A function that will be called when the port disconnects with the disconnected port and the store . This is useful for doing state cleanup if necessary .
function exposeStore(store, addConnectListener, disconnectCallback) {
  if (!addConnectListener) {
    addConnectListener = defaultConnectListener;
  }
  addConnectListener(port => {
    registerPortListeners(store, port, disconnectCallback);
  });
}
function exposeStore ( store , addConnectListener , disconnectCallback ) { if ( ! addConnectListener ) { addConnectListener = defaultConnectListener ; } addConnectListener ( port => { registerPortListeners ( store , port , disconnectCallback ) ; } ) ; }
Expose the Redux store in a background page to other parts of an extension.
Expose the Redux store in a background page to other parts of an extension .