🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

nano-db-fetch

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nano-db-fetch

NANO Database browser Fetch

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

📖 NANODbFetch driver

NANODbFetch is a database class built on top of NANODatabase, using IndexedDB for local caching of fetched data. It supports efficient data fetching, filtering, and storage using IndexedDB, allowing seamless offline access and synchronization with remote servers.

📌 Features

  • IndexedDB-based caching
  • Fetch data from a remote source or cache
  • Filter-based data retrieval
  • Manifest-based data storage and retrieval
  • Change tracking and merging
  • Storage usage calculation

🔑 Usage

import { NANODbFetch } from 'nano-db-fetch'
const fetchDb = new NANODbFetch('/', {
	inherit: true,
	extend: true,
	globals: true,
	refs: true,
	root: 'http://localhost'
})
await fetchDb.load()
// Fetching Data
const index = await fetchDb.get('/index')
// Fetching All Nodes including files, dirs, and globals
const nodes = await fetchDb.findAllNodes()
// Saving Data into the indexedDB but acceptable for the db in next retrievals
const newData = { content: ['Empty content'] }
await fetchDb.set('/index', newData)
// Checking Storage Usage
const usage = await fetchDb.getUsage()

Keywords

nano

FAQs

Package last updated on 26 Jun 2025

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