0.0.1 • Published 2 months ago

@browserfs/fetch v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

BrowserFS Fetch Backend

A BrowserFS backend for fetching files using HTTP.

Please read the BrowserFS documentation!

For more information, see the API documentation.

Installing

npm install @browserfs/fetch

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 Fetch via the global BrowserFS_Fetch object.

import { configure, fs } from '@browserfs/core';
import { Fetch } from '@browserfs/fetch';

await configure({ backend: Fetch, baseUrl: 'https://example.com/' });

const contents = await fs.readFile('/test.txt', 'utf-8');
console.log(contents);
0.0.1

2 months ago