[email protected]
Twitter
LinkedIn
YouTube
GitHub
  • Services
  • Blog
  • Repositories
  • GitHub
  • Resume
    • LinkedIn
    • PDF
  • Contact
Product was added to your cart

Cart

Dexie.js: A simple and robust library for indexedDB (HTML5 Storage)

July 16, 2015Front-Endjfadev

Dexie.js is a simple and concise library to work with the “Indexed Database API” or IndexedDB.

IndexedDB it is a way of storing data persistently in the browser. Given that allows the creation of web applications with enhanced query capabilities, These can be run both online and offline. IndexedDB is useful for applications that store a lot of data and applications that do not need a permanent connection to the Internet to work.

It can also be very useful to save data to local in a hybrid app for example.

Example of use:

/*
|---------------------------------------------
| Make a database connection
|---------------------------------------------
*/

var db = new Dexie('MyDatabase');

// Define a schema
db.version(1)
    .stores({
        friends: 'name, age'
    });

// Open the database
db.open()
    .catch(function(error){
        alert('Uh oh : ' + error);
    });


/*
|---------------------------------------------
| Then run some queries
|---------------------------------------------
*/

// Find some old friends
db.friends
    .where('age')
    .above(75)
    .each(function(friend){
        console.log(friend.name);
    });

// or make a new one
db.friends
    .add({
        name: 'Camilla',
        age: 25
    });

Web: dexie.org

Documentation: GitHub

Repository

A Minimalistic Wrapper for IndexedDB
https://github.com/dexie/Dexie.js
713 forks.
14,539 stars.
594 open issues.

Recent commits:
  • npm audit fix on samples/dexie-cloud-todo-app, David Fahlander
  • [email protected], David Fahlander
  • fix(dbcore): don't crash when an index is named 'constructor' (#2325)indexLookup in virtual-index-middleware.ts was a plain object literal,so declaring a table's primary key or an index with a keyPath equal toan inherited Object.prototype member (constructor, toString, valueOf,hasOwnProperty, etc.) made indexLookup[keyPathAlias] resolve throughthe prototype chain to that inherited value instead of undefined. The`|| []` fallback then never ran, and the followingindexList.push(virtualIndex) call threw "indexList.push is not afunction", crashing db.open() for any such schema.Use a null-prototype object for indexLookup so bracket lookups canonly ever see keys that were actually set on it.Added a regression test in test/tests-misc.js that declares an indexnamed 'constructor', opens the db, and adds/queries a row through it.Fixes #1920, GitHub
  • [email protected], David Fahlander
  • fix(dexie-cloud-addon): fall back to fetchTokens when refresh failsServer-side, refresh tokens issued via client_credentials (impersonation)now carry a client_id claim and get checked against that client row onevery 'refresh_token' grant (dexie-cloud PR #195) — so a revoked orexpired API client's refresh tokens correctly stop working, even if therefresh token's own exp claim (up to 3650 days) hasn't been reached yet.Client-side, login() had no recovery path for that case: a locallyunexpired refreshTokenExpiration was trusted blindly, and loadAccessToken()throwing on a 401 propagated straight out of login() uncaught.Now: a refresh failure (other than an OAuth redirect) falls through tothe same re-authentication path used for 'no refresh token', re-runningfetchTokens exactly as on first login. Customers with their own fetchTokens(e.g. server-side impersonation-based auth) get self-healing behavior:either silent re-mint under the hood if their own session is still valid,or their own challenge/login flow triggered if not — same as first login., David Fahlander

: Database, HTML5, IndexedDB, JS, Library, Storage, Web Developement

Services

  • Fix bugs in your Wordpress Site $40.00 / hr
  • Bot Tok $45.00
  • Fix bugs in your PHP Symfony App $50.00 / hr
  • Tasks Automation using Node.js $50.00 / hr
  • REST API Development with Symfony $50.00 / hr

Blog

  • How to Pay with a Bank Card on Cryptomus
  • Complete Beginner’s Guide to Bot Tok: Terminal Commands Explained
  • Top Site to Gain Views on TikTok
  • Jfa Whatsapp Chatbot
  • TikTok Bot

Explore

  • Free 10 Tiktok Likes
  • Free 2K TikTok Views
  • Free 100 TikTok Favorites
  • Free 300 TikTok Shares
  • Buy TikTok Views
  • Free 100 Instagram Likes
Twitter
LinkedIn
YouTube
GitHub

© 2013-2026 Jordi Fernandes Alves (@jfadev)