function prepare(rxDatabase) {
  return rxDatabase.storage.createInternalStorageInstance(rxDatabase.name).then(function (internalStore) {
    rxDatabase.internalStore = internalStore;
    return _ensureStorageTokenExists(rxDatabase);
  }).then(function (storageToken) {
    rxDatabase.storageToken = storageToken;

    if (rxDatabase.multiInstance) {
      _prepareBroadcastChannel(rxDatabase);
    }
  });
}
/**
 * do the async things for this database
 */
do the async things for this database
do the async things for this database
function prepare(rxDatabase) {
  return rxDatabase.storage.createInternalStorageInstance(rxDatabase.name).then(function (internalStore) {
    rxDatabase.internalStore = internalStore;
    return _ensureStorageTokenExists(rxDatabase);
  }).then(function (storageToken) {
    rxDatabase.storageToken = storageToken;
    if (rxDatabase.multiInstance) {
      _prepareBroadcastChannel(rxDatabase);
    }
  });
}
function prepare ( rxDatabase ) { return rxDatabase . storage . createInternalStorageInstance ( rxDatabase . name ) . then ( function ( internalStore ) { rxDatabase . internalStore = internalStore ; return _ensureStorageTokenExists ( rxDatabase ) ; } ) . then ( function ( storageToken ) { rxDatabase . storageToken = storageToken ; if ( rxDatabase . multiInstance ) { _prepareBroadcastChannel ( rxDatabase ) ; } } ) ; }
do the async things for this database
do the async things for this database