From acf992ef5d0d8238a1b912d298c9adafa10ff07a Mon Sep 17 00:00:00 2001 From: James P Date: Wed, 20 Mar 2024 09:09:23 -0500 Subject: [PATCH] Updated readme --- readme.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index 7c9e7f5..fc3f776 100644 --- a/readme.md +++ b/readme.md @@ -2,11 +2,12 @@ [BrowserFS](https://github.com/browser-fs/core) backend for `iso` files. -Please read the BrowserFS documentation! +> [!IMPORTANT] +> Please read the BrowserFS core documentation! ## Backend -This package adds `IsoFS`, which allows you to create a *readonly* file system from a iso file. +This package adds the `Iso` backend, which allows you to create a _readonly_ file system from a iso file. For more information, see the [API documentation](https://browser-fs.github.io/iso). @@ -18,16 +19,18 @@ npm install @browserfs/iso ## Usage -> 🛈 The examples are written in ESM. If you are using CJS, you can `require` the package. If running in a browser you can add a script tag to your HTML pointing to the `browser.min.js` and use BrowserFS Iso via the global `BrowserFS_ISO` object. +> [!NOTE] +> The examples are written in ESM. If you are using CJS, you can `require` the package. If running in a browser you can add a script tag to your HTML pointing to the `browser.min.js` and use BrowserFS Iso via the global `BrowserFS_ISO` object. ```js import { configure, fs } from '@browserfs/core'; -import { IsoFS } from '@browserfs/iso'; +import { Iso } from '@browserfs/iso'; const res = await fetch('http://example.com/image.iso'); -const isoData = await res.arrayBuffer(); -await configure({ '/mnt/iso': { fs: 'IsoFS', options: { isoData } } }); +await configure({ + '/mnt/iso': { backend: Iso, isoData: await res.arrayBuffer() }, +}); const contents = fs.readFileSync('/mnt/iso/in-image.txt', 'utf-8'); console.log(contents);