[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
712 forks.
14,571 stars.
596 open issues.

Recent commits:
  • [email protected], David Fahlander
  • Remove package-lock files. We're using pnpm!, David Fahlander
  • [email protected], David Fahlander
  • fix(updating hook): keep modifications intact in minified bundle (#2333)Fixes #2330The closure returned by hookUpdatingChain declared a named firstparameter and forwarded arguments to the next subscriber. uglify-jsreuses the parameter name for a local (this.onsuccess). The minifiedUMD bundle has no "use strict", so in sloppy mode the parameteraliases arguments[0]: the onsuccess assignment overwrites arguments[0]with null just before it is forwarded, and every updating-hooksubscriber after the first receives null as its modifications.Drop the named parameter and read arguments[0] into a var local, thesame shape as hookCreatingChain and hookDeletingChain in this file,which have always been safe under the same minifier.Verified against built artifacts with three updating subscribers:- [email protected] npm dist/dexie.min.js: subscribers 2 and 3 get null- locally built pristine master dist/dexie.min.js: same failure- dist/dexie.min.js with this fix: all subscribers get the modifications- dist/dexie.js (strict mode dev bundle): unaffected before and afterThe new qunit test guards both the runtime behavior and thestructural contract (the composed closure must declare noparameters), since karma loads the dev bundle, which can neverexhibit the sloppy-mode aliasing that only the minified bundle has., GitHub
  • [email protected], 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)