Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@browserfs/fs-dom
Advanced tools
BrowserFS backends for DOM APIs. DOM APIs are only available natively in browsers.
Please read the BrowserFS documentation!
HTTPRequest
: Downloads files on-demand from a webserver using fetch
.Storage
: Stores files in a Storage
object, like localStorage
and seesionStorage
.IndexedDB
: Stores files into an IndexedDB
object database.WorkerFS
: Lets you mount the BrowserFS file system configured in the main thread in a WebWorker, or the other way around!For more information, see the API documentation.
npm install @browserfs/fs-dom
🛈 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 thebrowser.min.js
and use BrowserFS DOM via the globalBrowserFS_DOM
object.
You can use DOM backends, though you must register them if you plan on using configure
:
import { configure, fs, registerBackend } from '@browserfs/core';
import { Storage } from '@browserfs/fs-dom';
registerBackend(Storage);
await configure({ fs: 'Storage', options: { storage: localStorage } });
if (!fs.existsSync('/test.txt')) {
fs.writeFileSync('/test.txt', 'This will persist across reloads!');
}
const contents = fs.readFileSync('/test.txt', 'utf-8');
console.log(contents);
FAQs
DOM backends for BrowserFS
The npm package @browserfs/fs-dom receives a total of 0 weekly downloads. As such, @browserfs/fs-dom popularity was classified as not popular.
We found that @browserfs/fs-dom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.