npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yipedb

v1.0.0

Published

A simple way to use IndexedDB, with built-in file import and export.

Readme

YipeDB

A simple way to use IndexedDB, with built-in file import and export.

Overview

YipeDB simplifies working with IndexedDB Web API by removing its complexity.

  • Store JSON, objects, and binary data (Blob / ArrayBuffer)
  • Export entire database as a ZIP archive
  • Import database from a ZIP archive
  • Auto-increment or custom keys
  • No schema setup required

Installation & Usage

Installation

Browser

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/rezzvy/yipedb@056f5d2/dist/yipedb.min.js"></script>

Node

npm install yipedb
import YipeDB from "yipedb";

Usage

(async () => {
  const db = new YipeDB("MyAppData");

  await db.use("users").set({ name: "Alice", role: "Admin" });

  const users = await db.use("users").getAll();
  console.log(users);
})();

Examples

Auto-increment key vs custom key

(async () => {
  const db = new YipeDB("TestDB");

  // auto key
  await db.use("users").set({ name: "Nurul" });

  // custom key
  await db.use("users").set({ name: "Trisha" }, "user_2");
})();

Export database as downloadable file

(async () => {
  const db = new YipeDB("MyAppData");
  await db.use("test").set("Hello!");

  const zipBlob = await db.export();
  const url = URL.createObjectURL(zipBlob);
  const a = document.createElement("a");
  a.href = url;
  a.download = "backup.zip";
  a.click();
})();

Import database from file

const db = new YipeDB("MyAppData");
const input = document.querySelector("input[type=file]");

input.addEventListener("change", async () => {
  const file = input.files[0];
  const result = await db.import(file);
});

Documentation

API Reference

new YipeDB(dbName, version?)

Creates a new database instance.

| Parameter | Type | Description | | --------- | -------- | ---------------------------------------------------- | | dbName | string | Database name (max 64 chars, alphanumeric, _, -) | | version | number | Database version (default: 1) |

db.use(tableName)

Access or create a table (object store).

| Parameter | Type | Description | | ----------- | -------- | ----------- | | tableName | string | Table name |

Returns: An object containing the following table operation methods.

[!NOTE]
All table methods are async and return a Promise.

| Method | Description | Returns | | ----------------- | --------------------- | ----------------------------------------------------------------------- | | set(value, id?) | Insert or update data | Promise<{ key: any, value: any }> The inserted key and value. | | get(id) | Get single entry | Promise<any \| null> The stored entry object, or null if not found. | | getAll() | Get all entries | Promise<Array<any>> An array of all stored entry objects. | | unset(id) | Delete entry | Promise<boolean> Resolves to true upon successful deletion. | | unsetAll() | Clear table | Promise<boolean> Resolves to true upon successful clearing. |

db.export()

Exports the entire database.

| Returns | Description | | --------------- | ---------------------------- | | Promise<Blob> | ZIP file containing all data |

db.import(file, options?)

Imports a database from a ZIP file.

| Parameter | Type | Default | Description | | ------------------ | --------------------- | ------- | --------------------------------- | | file | Blob \| ArrayBuffer | - | ZIP archive | | options.clear | boolean | true | Clear existing data before import | | options.maxBytes | number | 100MB | Maximum allowed size |

Returns:

| Property | Type | Description | | :----------- | :------- | :--------------------------------------------------------------------------------------------- | | dbName | string | Name of the imported database | | exportedAt | string | ISO Timestamp of when the data was originally exported | | results | object | Object containing the number of successfully imported rows per table (e.g., { "users": 15 }) |

Export / Import Details

Export structure

The generated ZIP file contains:

manifest.json
tables/
  *.json
blobs/
  *.bin
  • manifest.json Contains metadata, store list, version, timestamp, and checksum.

  • tables/*.json Each table is exported as structured entries:

    {
      "key": 1,
      "valueType": "json | blob | arraybuffer | json_with_blobs",
      "value": ...
    }
  • blobs/ Binary data extracted and stored separately for safety and portability.

Supported value types

| Type | Description | | ----------------- | -------------------------------------- | | json | Plain JSON values | | blob | Stored as binary file | | arraybuffer | Stored as binary file | | json_with_blobs | Object containing embedded Blob fields |

Import behavior

  • Validates ZIP structure and manifest
  • Verifies checksum (basic integrity check)
  • Prevents zip bomb attacks via size limits
  • Restores all tables and binary data correctly

Contributing

There's always room for improvement. Feel free to contribute!

Licensing

The project is licensed under the MIT License. Check the license file for more details.