最終更新:2019-05-16 (木) 14:07:43 (8d)  

Dexie.js はてなブックマークを見る
Top / Dexie.js

A Minimalistic Wrapper for IndexedDB

https://dexie.org/

使い方

  • const db = new Dexie('MyDatabase');
    
    // Declare tables, IDs and indexes
    db.version(1).stores({
    	friends: '++id, name, age'
    });

Where

  • db.friends.where('shoeSize')
        .between(37, 40)
        .or('name')
        .anyOf(['Arnold','Ingemar'])
        .and(function(friend) { return friend.isCloseFriend; })
        .limit(10)
        .each(function(friend){
            console.log(JSON.stringify(friend));
        });

参考