_initStorage.js 690 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var localforage_driver_commons_1 = require("localforage-driver-commons");
  4. var Store_1 = require("./Store");
  5. function _initStorage(options) {
  6. var opts = options ? localforage_driver_commons_1.clone(options) : {};
  7. var kp = localforage_driver_commons_1.getKeyPrefix(opts, this._defaultConfig);
  8. var store = Store_1.Store.resolve(kp);
  9. this._dbInfo = opts;
  10. this._dbInfo.serializer = localforage_driver_commons_1.serialiser;
  11. this._dbInfo.keyPrefix = kp;
  12. this._dbInfo.mStore = store;
  13. return Promise.resolve();
  14. }
  15. exports._initStorage = _initStorage;
  16. //# sourceMappingURL=_initStorage.js.map