[email protected]
Twitter
LinkedIn
YouTube
GitHub
  • Serviços
  • Blog
  • Repositórios
  • GitHub
  • Currículo
    • LinkedIn
    • PDF
  • Contato
Produto foi adicionado ao seu carrinho

Carrinho

Dexie.js: Uma biblioteca simples e robusta para indexedDB (HTML5 Storage)

Julho 16, 2015Front-endjfadev

Dexie.js é uma biblioteca simples e concisa para trabalhar com o “Indexed Database API” ou IndexedDB.

IndexedDB é uma maneira de armazenar dados persistentemente no navegador. Dado que permite a criação de aplicações web com recursos de consulta avançada, estes podem ser executados on-line e off-line. IndexedDB é útil para aplicativos que armazenam uma grande quantidade de dados e aplicações que não necessitam de uma ligação permanente à Internet para funcionar.

Também pode ser muito útil salvar dados em local em um aplicativo híbrido por exemplo.

Exemplo de uso:

/*
|---------------------------------------------
| 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

Documentação: GitHub

Repositório

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, Desenvolvimento Web

Serviços

  • Correção de bugs em seu site Wordpress $40.00 / hora
  • Bot Tok $45.00
  • Correção de bugs em seu aplicativo PHP Symfony $50.00 / hora
  • Automação de tarefas usando Node.js $50.00 / hora
  • Desenvolvimento de API REST com Symfony $50.00 / hora

Blog

  • Como pagar com um cartão bancário em Cryptomus
  • Guia completo para iniciantes para o Bot Tok: Comandos do terminal explicados
  • Melhor site para obter visualizações no TikTok
  • Jfa Whatsapp Chatbot
  • Bot do TikTok

Explorar

  • Livre 10 Curtidas no TikTok
  • Visualizações 2K gratuitas do TikTok
  • Livre 100 Favoritos do TikTok
  • Livre 300 Compartilhamentos do TikTok
  • Comprar visualizações do TikTok
  • Livre 100 Curtidas no Instagram
Twitter
LinkedIn
YouTube
GitHub

© 2013-2026 Jordi Fernandes Alves (@jfadev)