From 8738bd3c82dd19c9f0e01489c9de69fdc6387a14 Mon Sep 17 00:00:00 2001 From: "Dr. Vortex" Date: Sun, 15 Oct 2023 08:44:52 -0500 Subject: [PATCH] Fixed readme --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index cc5607d..22790d9 100644 --- a/readme.md +++ b/readme.md @@ -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!');