AFFiNE/packages/y-indexeddb
2023-05-03 00:29:58 -05:00
..
benchmark perf(y-indexeddb): improve boost and loading time (#1879) 2023-04-11 17:29:44 -05:00
src chore: enable no-unused vars (#2181) 2023-04-28 00:41:06 -05:00
package.json v0.5.4-canary.20 2023-05-03 00:29:58 -05:00
README.md docs(y-indexeddb): add README.md (#1886) 2023-04-11 23:37:24 -05:00
tsconfig.json refactor: remove y-indexeddb (#1771) 2023-04-02 02:57:50 -05:00
tsconfig.node.json refactor: remove y-indexeddb (#1771) 2023-04-02 02:57:50 -05:00
vite.config.ts build(y-indexeddb): fix vite config 2023-04-20 18:08:33 -05:00

@toeverything/y-indexeddb

This package haven't been published yet.

Usage

import { createIndexedDBProvider } from '@toeverything/y-indexeddb';
import * as Y from 'yjs';
const yDoc = new Y.Doc();

const provider = createIndexedDBProvider('docName', yDoc);
provider.connect();
await provider.whenSynced.then(() => {
  console.log('synced');
  provider.disconnect();
});