How to use the offix-offline.createDefaultOfflineStorage function in offix-offline

To help you get started, we’ve selected a few offix-offline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerogear / offix / packages / offix-client / src / config / OffixDefaultConfig.ts View on Github external
constructor(clientOptions?: OffixClientConfig) {
    if (clientOptions && clientOptions.storage) {
      this.cacheStorage = clientOptions.storage;
      this.offlineStorage = clientOptions.storage;
    } else {
      this.cacheStorage = createDefaultCacheStorage();
      this.offlineStorage = createDefaultOfflineStorage();
    }
    this.networkStatus = (isMobileCordova()) ?
      new CordovaNetworkStatus() : new WebNetworkStatus();

    if (clientOptions && clientOptions.conflictStrategy) {
      this.conflictStrategy = clientOptions.conflictStrategy;
    } else {
      this.conflictStrategy = UseClient;
    }
    Object.assign(this, clientOptions);
  }
}

offix-offline

Offix package that exposes network interfaces

Apache-2.0
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis