Gathering detailed insights and metrics for @wwog/idbfs
Gathering detailed insights and metrics for @wwog/idbfs
Gathering detailed insights and metrics for @wwog/idbfs
Gathering detailed insights and metrics for @wwog/idbfs
npm install @wwog/idbfs
Typescript
Module System
Node Version
NPM Version
74.7
Supply Chain
90.1
Quality
77.6
Maintenance
100
Vulnerability
100
License
TypeScript (99.41%)
HTML (0.59%)
Total Downloads
376
Last Day
1
Last Week
1
Last Month
7
Last Year
376
MIT License
3 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jul 29, 2024
Minified
Minified + Gzipped
Latest Version
1.0.2
Package Id
@wwog/idbfs@1.0.2
Unpacked Size
64.76 kB
Size
12.69 kB
File Count
8
NPM Version
10.7.0
Node Version
20.15.1
Published on
Jul 29, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
-46.2%
7
Compared to previous month
Last Year
0%
376
Compared to previous year
4
A file system built on the front end of the web, using
indexedDB
as the back-end storage, as an alternative storage solution or compatible solution for Opfs. It supports reading and writing of filestream
and can be used for uploading and downloading large files..Most of the APIs refer to NodeJS, which is used in a similar way.
Stream
Api1import { mount } from "@wwog/idbfs"; 2 3const fs = await mount(); 4 5const result = await fs.readdir("/"); 6console.log(result); // {dirs:[], files:[]}
1const handle = await window.showSaveFilePicker(); 2//Use the stream internally 3await fs.saveFile(handle, "/bigFile");
1const file = fileInput.files?.[0]; 2if (!file) { 3 return alert("please select file"); 4} 5const path = "/" + file.name; 6const idbFile = await fs.createFile(path, { mimeType: file.type }); 7const wStream = fs.createWriteStream(idbFile); 8await file.stream().pipeTo(wStream);
1import { streamToAsyncIterator } from "@wwog/idbfs"; 2const rStream = fs.createReadStream(path); 3for await (chunk of streamToAsyncIterator(rStream)) { 4 console.log(chunk); 5}
No vulnerabilities found.
No security vulnerabilities found.