Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

indexeddb-fs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indexeddb-fs

An 'fs' kind of library dedicated for the browser. It works based on indexed-db.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
181
decreased by-14.22%
Maintainers
1
Weekly downloads
 
Created
Source

indexeddb-fs

An fs kind of library dedicated to the browser. indexeddb-fs is a module that allows you to store data in the browser using an API similar to that of Node's fs module. It works based on a browser database called IndexedDB.

Super quick start

npm install indexeddb-fs --save-dev
import { isFile, writeFile, isDirectory, createDirectory, rootDirectoryName } from 'indexeddb-fs';

await createDirectory('files');
await createDirectory('/files/private');
await createDirectory('root/files/public');

console.log(await isDirectory('root')); // true
console.log(await isDirectory('files')); // true
console.log(await isDirectory('/files/private')); // true

await writeFile('files/public/file.txt', 'content');
console.log(await isFile('files/public/file.txt')); // true
console.log(await isDirectory('files/public/file.txt')); // false

await removeDirectory(rootDirectoryName);

Keywords

FAQs

Package last updated on 20 Jul 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc