Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function BrowserClient({ appID, token, bucketConfig, database, version }) {
this.databaseName = database || 'simperium-objects';
this.databaseVersion = version || 1;
let config = (this.bucketConfig = bucketConfig);
this.bucketDB = store_provider(this.configureDb.bind(this));
this.buckets = {};
let objectStoreProvider = this.bucketDB.provider();
this.ghostStore = ghost_store;
this.client = simperium(appID, token, {
ghostStoreProvider: ghost_store,
objectStoreProvider: function(bucket) {
var store = objectStoreProvider.apply(null, arguments);
if (config[bucket.name].beforeIndex) {
store.beforeIndex = config[bucket.name].beforeIndex;
}
return store;
},
});
[
'send',
'message',
'connect',
'reconnect',
'disconnect',