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

indexed-database-manager

v1.0.3

Published

A TypeScript wrapper for IndexedDB with CRUD operations

Readme

IndexDB Manager

npm
License
Downloads
CI Status
Demo

IndexDB Manager es un potente envoltorio TypeScript para IndexedDB que simplifica la gestión de bases de datos, tablas y columnas con operaciones CRUD completas.

Características

  • 🛠️ Creación de bases de datos, tablas y columnas
  • 🔍 Operaciones CRUD completas (Crear, Leer, Actualizar, Eliminar)
  • 🔎 Consultas avanzadas con filtrado, ordenación y paginación
  • 🛡️ Operaciones type-safe con soporte TypeScript
  • 🔄 Soporte para transacciones
  • 📊 Gestión de índices
  • 🚀 Ligero y fácil de usar
  • 🏗️ Migraciones de esquema
  • 🔌 Agnóstico a frameworks (funciona con React, Angular, Vue, etc.)

Instalación

npm install indexed-database-manager 
# o  
yarn add indexed-database-manager  

Uso Básico

1. Creación de una Base de Datos

import { Database, Table, Column } from 'indexed-database-manager';  

const myDB = new Database({  
  name: 'MyAppDB',  
  version: 1,  
  tables: [  
    {  
      name: 'users',  
      primaryKey: 'id',  
      autoIncrement: true,  
      columns: [  
        { name: 'name', type: 'string', required: true },  
        { name: 'email', type: 'string', unique: true },  
        { name: 'age', type: 'number' },  
        { name: 'isActive', type: 'boolean', defaultValue: true }  
      ]  
    }  
  ]  
});  

const db = await myDB.connect();  

Integración con Frameworks

Ejemplo con React

import { useEffect, useState } from 'react';  
import { Database } from 'indexed-database-manager';  

function UserList() {  
  const [users, setUsers] = useState([]);  

  useEffect(() => {  
    async function loadData() {  
      const db = new Database({ /* config */ });  
      const connection = await db.connect();  
      const users = await db.getTable('users').findAll(connection);  
      setUsers(users);  
    }  

    loadData();  
  }, []);  

  return (  
    <ul>  
      {users.map(user => (  
        <li key={user.id}>{user.name}</li>  
      ))}  
    </ul>  
  );  
}  

Ejemplo con Angular

import { Injectable } from '@angular/core';  
import { Database } from 'indexed-database-manager';  

@Injectable({ providedIn: 'root' })  
export class DataService {  
  private db: Database;  

  constructor() {  
    this.db = new Database({ /* config */ });  
  }  

  async getUsers() {  
    const connection = await this.db.connect();  
    return this.db.getTable('users').findAll(connection);  
  }  
}  

Ejemplo con Vue

<script setup>  
import { ref, onMounted } from 'vue';  
import { Database } from 'indexed-database-manager';  

const users = ref([]);  

onMounted(async () => {  
  const db = new Database({ /* config */ });  
  const connection = await db.connect();  
  users.value = await db.getTable('users').findAll(connection);  
});  
</script>  

Uso Avanzado

Consultas de Datos

// Buscar usuarios activos mayores de 21 años, ordenados por nombre  
const activeUsers = await usersTable.findAll(db, {  
  where: {  
    isActive: { equals: true },  
    age: { greaterThan: 21 }  
  },  
  orderBy: { name: 'asc' }  
});  

Transacciones

const transaction = db.transaction(['users', 'orders'], 'readwrite');  

try {  
  await usersTable.createInTransaction(transaction, userData);  
  await ordersTable.createInTransaction(transaction, orderData);  
  await transaction.complete;  
} catch (error) {  
  transaction.abort();  
}  

Registro de Cambios

v1.1.0

  • Soporte para transacciones
  • Mejoras en las definiciones TypeScript
  • Nuevos operadores de consulta

v1.0.0

  • Versión inicial con operaciones CRUD básicas

Guía de Migración

// Actualizar versión de la base de datos para modificar el esquema  
const myDB = new Database({  
  name: 'MyAppDB',  
  version: 2, // Versión incrementada  
  tables: [  
    // Esquema actualizado  
  ]  
});  

Soporte de Navegadores

  • Chrome 24+
  • Firefox 16+
  • Safari 7.1+
  • Edge 12+
  • Opera 15+

Contribuciones

  1. Haz un fork del repositorio
  2. Crea tu rama de feature
  3. Haz commit de tus cambios
  4. Haz push a la rama
  5. Abre un Pull Request
git clone https://github.com/albertogodoy/indexedb-manager.git  
cd indexdb-manager  
npm install  
npm run dev  

Licencia

MIT © 2023 Alberto Godoy

Soporte