MCPcopy
hub / github.com/localForage/localForage / prepareStorage

Function prepareStorage

test/test.api.js:1174–1185  ·  view source on GitHub ↗
(storageName)

Source from the content-addressed store, hash-verified

1172 });
1173
1174 function prepareStorage(storageName) {
1175 // Delete IndexedDB storages (start from scratch)
1176 // Refers to issue #492 - https://github.com/mozilla/localForage/issues/492
1177 if (driverName === localforage.INDEXEDDB) {
1178 return new Promise(function(resolve) {
1179 indexedDB.deleteDatabase(storageName).onsuccess = resolve;
1180 });
1181 }
1182
1183 // Otherwise, do nothing
1184 return Promise.resolve();
1185 }
1186
1187 describe(driverName + ' driver multiple instances', function() {
1188 'use strict';

Callers 1

test.api.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…