@webufs/webufs-browser
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Webufs browser-side usable js library.

This projet builds the @webufs/webufs package as an iife js library, which is directly usable in the browser.

Note: @webufs/webufs-idb is included in the build.

Usage

<!-- use unpkg -->
<script src="https://www.unpkg.com/@webufs/webufs-browser@latest/build/webufs.min.js"></script>
<!-- or download as a static file on your server -->
<script src="webufs.min.js"></script>

and then

// Yes, it's async
const ctx = await webufs.createDefaultContext()

// Mount IndexedDB-backed filesystem at '/idb'
ctx.getVFS().registerFSType(webufs.IDBFS)
await ctx.mkdir('idb')
await ctx.mount('idbfs', '/idb')
await ctx.chdir('idb')

// ... now play with 'ctx'

For details on how to use it, please read the document of the core package @webufs/webufs and @webufs/webufs-idb

Package Sidebar

Install

npm i @webufs/webufs-browser

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

83.4 kB

Total Files

4

Last publish

Collaborators

  • parabola2004