MCPcopy
hub / github.com/jvilk/BrowserFS / constructor

Method constructor

src/backend/IndexedDB.ts:243–255  ·  view source on GitHub ↗

* **Deprecated. Use IndexedDB.Create() method instead.** * * Constructs an IndexedDB file system. * @param cb Called once the database is instantiated and ready for use. * Passes an error if there was an issue instantiating the database. * @param storeName The name of this file syst

(cb: BFSCallback<IndexedDBFileSystem>, storeName?: string, deprecateMsg: boolean = true)

Source from the content-addressed store, hash-verified

241 * a different name.
242 */
243 constructor(cb: BFSCallback<IndexedDBFileSystem>, storeName?: string, deprecateMsg: boolean = true) {
244 super();
245 this.store = new IndexedDBStore((e): void => {
246 if (e) {
247 cb(e);
248 } else {
249 this.init(this.store, (e?) => {
250 cb(e, this);
251 });
252 }
253 }, storeName);
254 deprecationMessage(deprecateMsg, IndexedDBFileSystem.Name, {storeName: storeName});
255 }
256}

Callers

nothing calls this directly

Calls 3

deprecationMessageFunction · 0.90
cbFunction · 0.85
initMethod · 0.80

Tested by

no test coverage detected