Skip to content

Commit

Permalink
Fixed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 15, 2023
1 parent d16adb8 commit 8738bd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ npm install @browserfs/fs-dom
You can use DOM backends, though you must register them if you plan on using `configure`:

```js
import { configure, fs } from '@browserfs/core';
import { configure, fs, registerBackend } from '@browserfs/core';
import { Storage } '@browserfs/fs-dom';

// you can also add a callback as the last parameter instead of using promises
await configure({ fs: 'Storage' });
registerBackend(Storage);
await configure({ fs: 'Storage', options: { storage: localStorage } });

if (!fs.existsSync('/test.txt')) {
fs.writeFileSync('/test.txt', 'This will persist across reloads!');
Expand Down

0 comments on commit 8738bd3

Please sign in to comment.