(cb: (name: string, obj: FileSystem[]) => void)
| 2 | import {FileSystem} from '../../../src/core/file_system'; |
| 3 | |
| 4 | export default function IDBFSFactory(cb: (name: string, obj: FileSystem[]) => void): void { |
| 5 | if (IndexedDBFileSystem.isAvailable()) { |
| 6 | IndexedDBFileSystem.Create({ |
| 7 | storeName: `test-${Math.random()}` |
| 8 | }, (e, fs?) => { |
| 9 | if (e) { |
| 10 | throw e; |
| 11 | } |
| 12 | fs.empty((e?) => { |
| 13 | if (e) { |
| 14 | throw e; |
| 15 | } |
| 16 | cb('IndexedDB', [fs]); |
| 17 | }); |
| 18 | }); |
| 19 | } else { |
| 20 | cb('IndexedDB', []); |
| 21 | } |
| 22 | } |
no test coverage detected