2018-06-26 06:56:36 +00:00
|
|
|
"use strict";
|
|
|
|
|
2020-06-28 16:43:26 +00:00
|
|
|
// TODO: don't need this file anymore?
|
2018-06-26 06:56:36 +00:00
|
|
|
|
2020-06-28 16:43:26 +00:00
|
|
|
declare var localforage;
|
2018-06-28 04:18:16 +00:00
|
|
|
|
2020-06-29 16:06:19 +00:00
|
|
|
export function createNewPersistentStore(storeid:string, callback?) {
|
2018-06-29 23:44:04 +00:00
|
|
|
var store = localforage.createInstance({
|
2019-05-08 23:15:26 +00:00
|
|
|
name: "__" + storeid,
|
2018-07-07 05:09:15 +00:00
|
|
|
version: 2.0
|
2018-06-28 04:18:16 +00:00
|
|
|
});
|
2020-06-29 16:06:19 +00:00
|
|
|
if (callback != null) { callback(store); } // for tests only
|
2018-06-28 04:18:16 +00:00
|
|
|
return store;
|
|
|
|
}
|