[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3900":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},3900,"Dexie.js","dexie\u002FDexie.js","dexie","A Minimalistic Wrapper for IndexedDB","https:\u002F\u002Fdexie.org",null,"TypeScript",14418,702,113,580,0,16,77,142,97,43.54,"Apache License 2.0",false,"master",true,[27,28,29,30,31,32],"database","indexeddb","javascript","offline","offline-storage","storage","2026-06-12 02:00:55","# Dexie.js\n\n[![NPM Version][npm-image]][npm-url] ![Build Status](https:\u002F\u002Fgithub.com\u002Fdexie\u002FDexie.js\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg) [![Join our Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1328303736363421747?label=Discord&logo=discord&style=badge)](https:\u002F\u002Fdiscord.gg\u002Fhuhre7MHBF)\n\nDexie.js is a wrapper library for indexedDB - the standard database in the browser. https:\u002F\u002Fdexie.org.\n\n#### Why Dexie.js?\n\nIndexedDB is the portable database for all browser engines. Dexie.js makes it fun and easy to work with.\n\nBut also:\n\n* Dexie.js is widely used by 100,000 of web sites, apps and other projects and supports all browsers, Electron for Desktop apps, Capacitor for iOS \u002F Android apps and of course pure PWAs.\n* Dexie.js works around bugs in the IndexedDB implementations, giving a more stable user experience.\n* Need sync? [Dexie Cloud](https:\u002F\u002Fdexie.org\u002Fcloud\u002F) adds real-time sync, auth, and collaboration on top of Dexie.js — no backend needed.\n\n#### Hello World (vanilla JS)\n\n```html\n\u003C!DOCTYPE html>\n\u003Chtml>\n  \u003Chead>\n    \u003Cscript type=\"module\">\n      \u002F\u002F Import Dexie\n      import { Dexie } from 'https:\u002F\u002Funpkg.com\u002Fdexie\u002Fdist\u002Fmodern\u002Fdexie.mjs';\n\n      \u002F\u002F\n      \u002F\u002F Declare Database\n      \u002F\u002F\n      const db = new Dexie('FriendDatabase');\n      db.version(1).stores({\n        friends: '++id, age'\n      });\n\n      \u002F\u002F\n      \u002F\u002F Play with it\n      \u002F\u002F\n      try {\n        await db.friends.add({ name: 'Alice', age: 21 });\n\n        const youngFriends = await db.friends\n            .where('age')\n            .below(30)\n            .toArray();\n\n        alert(`My young friends: ${JSON.stringify(youngFriends)}`);\n      } catch (e) {\n        alert(`Oops: ${e}`);\n      }\n    \u003C\u002Fscript>\n  \u003C\u002Fhead>\n\u003C\u002Fhtml>\n```\n\nYes, it's that simple. Read [the docs](https:\u002F\u002Fdexie.org\u002Fdocs\u002F) to get into the details.\n\n#### Hello World (legacy script tags)\n\n```html\n\u003C!DOCTYPE html>\n\u003Chtml>\n  \u003Chead>\n    \u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fdexie\u002Fdist\u002Fdexie.js\">\u003C\u002Fscript>\n    \u003Cscript>\n\n      \u002F\u002F\n      \u002F\u002F Declare Database\n      \u002F\u002F\n      const db = new Dexie('FriendDatabase');\n      db.version(1).stores({\n        friends: '++id, age'\n      });\n\n      \u002F\u002F\n      \u002F\u002F Play with it\n      \u002F\u002F\n      db.friends.add({ name: 'Alice', age: 21 }).then(() => {\n        return db.friends\n          .where('age')\n          .below(30)\n          .toArray();\n      }).then(youngFriends => {\n        alert (`My young friends: ${JSON.stringify(youngFriends)}`);\n      }).catch (e => {\n        alert(`Oops: ${e}`);\n      });\n\n    \u003C\u002Fscript>\n  \u003C\u002Fhead>\n\u003C\u002Fhtml>\n```\n\n#### Hello World (React + Typescript)\n\nReal-world apps are often built using components in various frameworks. Here's a version of Hello World written for React and Typescript. There are also links below this sample to more tutorials for different frameworks...\n\n```tsx\nimport React from 'react';\nimport { Dexie, type EntityTable } from 'dexie';\nimport { useLiveQuery } from 'dexie-react-hooks';\n\n\u002F\u002F Typing for your entities (hint is to move this to its own module)\nexport interface Friend {\n  id: number;\n  name: string;\n  age: number;\n}\n\n\u002F\u002F Database declaration (move this to its own module also)\nexport const db = new Dexie('FriendDatabase') as Dexie & {\n  friends: EntityTable\u003CFriend, 'id'>;\n};\ndb.version(1).stores({\n  friends: '++id, age',\n});\n\n\u002F\u002F Component:\nexport function MyDexieReactComponent() {\n  const youngFriends = useLiveQuery(() =>\n    db.friends\n      .where('age')\n      .below(30)\n      .toArray()\n  );\n\n  return (\n    \u003C>\n      \u003Ch3>My young friends\u003C\u002Fh3>\n      \u003Cul>\n        {youngFriends?.map((f) => (\n          \u003Cli key={f.id}>\n            Name: {f.name}, Age: {f.age}\n          \u003C\u002Fli>\n        ))}\n      \u003C\u002Ful>\n      \u003Cbutton\n        onClick={() => {\n          db.friends.add({ name: 'Alice', age: 21 });\n        }}\n      >\n        Add another friend\n      \u003C\u002Fbutton>\n    \u003C\u002F>\n  );\n}\n```\n\n[Tutorials for React, Svelte, Vue, Angular and vanilla JS](https:\u002F\u002Fdexie.org\u002Fdocs\u002FTutorial\u002FGetting-started)\n\n[API Reference](https:\u002F\u002Fdexie.org\u002Fdocs\u002FAPI-Reference)\n\n[Samples](https:\u002F\u002Fdexie.org\u002Fdocs\u002FSamples)\n\n### Performance\n\nDexie has kick-ass performance. Its [bulk methods](\u003Chttps:\u002F\u002Fdexie.org\u002Fdocs\u002FTable\u002FTable.bulkPut()>) take advantage of a lesser-known feature in IndexedDB that makes it possible to store stuff without listening to every onsuccess event. This speeds up the performance to a maximum.\n\n#### Supported operations\n\n```js\nabove(key): Collection;\naboveOrEqual(key): Collection;\nadd(item, key?): Promise;\nand(filter: (x) => boolean): Collection;\nanyOf(keys[]): Collection;\nanyOfIgnoreCase(keys: string[]): Collection;\nbelow(key): Collection;\nbelowOrEqual(key): Collection;\nbetween(lower, upper, includeLower?, includeUpper?): Collection;\nbulkAdd(items: Array): Promise;\nbulkDelete(keys: Array): Promise;\nbulkPut(items: Array): Promise;\nclear(): Promise;\ncount(): Promise;\ndelete(key): Promise;\ndistinct(): Collection;\neach(callback: (obj) => any): Promise;\neachKey(callback: (key) => any): Promise;\neachPrimaryKey(callback: (key) => any): Promise;\neachUniqueKey(callback: (key) => any): Promise;\nequals(key): Collection;\nequalsIgnoreCase(key): Collection;\nfilter(fn: (obj) => boolean): Collection;\nfirst(): Promise;\nget(key): Promise;\ninAnyRange(ranges): Collection;\nkeys(): Promise;\nlast(): Promise;\nlimit(n: number): Collection;\nmodify(changeCallback: (obj: T, ctx:{value: T}) => void): Promise;\nmodify(changes: { [keyPath: string]: any } ): Promise;\nnoneOf(keys: Array): Collection;\nnotEqual(key): Collection;\noffset(n: number): Collection;\nor(indexOrPrimayKey: string): WhereClause;\norderBy(index: string): Collection;\nprimaryKeys(): Promise;\nput(item: T, key?: Key): Promise;\nreverse(): Collection;\nsortBy(keyPath: string): Promise;\nstartsWith(key: string): Collection;\nstartsWithAnyOf(prefixes: string[]): Collection;\nstartsWithAnyOfIgnoreCase(prefixes: string[]): Collection;\nstartsWithIgnoreCase(key: string): Collection;\ntoArray(): Promise;\ntoCollection(): Collection;\nuniqueKeys(): Promise;\nuntil(filter: (value) => boolean, includeStopEntry?: boolean): Collection;\nupdate(key: Key, changes: { [keyPath: string]: any }): Promise;\n```\n\nThis is a mix of methods from [WhereClause](https:\u002F\u002Fdexie.org\u002Fdocs\u002FWhereClause\u002FWhereClause), [Table](https:\u002F\u002Fdexie.org\u002Fdocs\u002FTable\u002FTable) and [Collection](https:\u002F\u002Fdexie.org\u002Fdocs\u002FCollection\u002FCollection). Dive into the [API reference](https:\u002F\u002Fdexie.org\u002Fdocs\u002FAPI-Reference) to see the details.\n\n## Dexie Cloud\n\n[Dexie Cloud](https:\u002F\u002Fdexie.org\u002Fcloud\u002F) is the easiest way to add sync, authentication, and real-time collaboration to your Dexie app. You keep writing frontend code with Dexie.js — Dexie Cloud handles the rest.\n\n**What you get:**\n- 🔄 **Sync across devices** — changes propagate in real time, no polling needed\n- 🔐 **Authentication** — built-in user auth, no identity provider required\n- 🛡️ **Access control** — share data between users with fine-grained permissions\n- 📁 **File & blob storage** — store attachments alongside your structured data\n- ✈️ **Offline-first** — works fully offline, syncs when back online\n\n**Getting started is just a few lines:**\n\n```bash\nnpm install dexie-cloud-addon\n```\n\n```ts\nimport Dexie from 'dexie';\nimport dexieCloud from 'dexie-cloud-addon';\n\nconst db = new Dexie('MyDatabase', { addons: [dexieCloud] });\ndb.version(1).stores({ items: '@id, title' });\ndb.cloud.configure({ databaseUrl: 'https:\u002F\u002F\u003Cyour-db>.dexie.cloud' });\n```\n\nThat's it. Your existing Dexie app now syncs. Hosted cloud or self-hosted on your own infrastructure. 👋\n\n→ [Quickstart guide](https:\u002F\u002Fdexie.org\u002Fcloud\u002Fdocs\u002Fquickstart)\n\n**Sample app:**\n\nSource: [Dexie Cloud To-do app](https:\u002F\u002Fgithub.com\u002Fdexie\u002FDexie.js\u002Ftree\u002Fmaster\u002Fsamples\u002Fdexie-cloud-todo-app)\n\nLive demo: https:\u002F\u002Fdexie.github.io\u002FDexie.js\u002Fdexie-cloud-todo-app\u002F\n\n## Legacy Addons (dexie-observable, dexie-syncable)\n\n> **⚠️ These packages are legacy and no longer maintained.**\n\nIf you find references to `dexie-observable` or `dexie-syncable` in tutorials, blog posts, or old code, be aware that these are **deprecated** sync solutions. They are not compatible with Dexie Cloud and should not be used in new projects.\n\n**For local-first sync, use [`dexie-cloud-addon`](https:\u002F\u002Fdexie.org\u002Fcloud\u002F) instead.** It is the modern, actively maintained solution for offline-first apps with real-time sync.\n\n## Samples\n\nhttps:\u002F\u002Fdexie.org\u002Fdocs\u002FSamples\n\nhttps:\u002F\u002Fgithub.com\u002Fdexie\u002FDexie.js\u002Ftree\u002Fmaster\u002Fsamples\n\n## Knowledge Base\n\n[https:\u002F\u002Fdexie.org\u002Fdocs\u002FQuestions-and-Answers](https:\u002F\u002Fdexie.org\u002Fdocs\u002FQuestions-and-Answers)\n\n## Website\n\n[https:\u002F\u002Fdexie.org](https:\u002F\u002Fdexie.org)\n\n## Install via npm\n\n```\nnpm install dexie\n```\n\n## Download\n\nFor those who don't like package managers, here's the download links:\n\n### UMD (for legacy script includes as well as commonjs require):\n\nhttps:\u002F\u002Funpkg.com\u002Fdexie@latest\u002Fdist\u002Fdexie.min.js\n\nhttps:\u002F\u002Funpkg.com\u002Fdexie@latest\u002Fdist\u002Fdexie.min.js.map\n\n### Modern (ES module):\n\nhttps:\u002F\u002Funpkg.com\u002Fdexie@latest\u002Fdist\u002Fmodern\u002Fdexie.min.mjs\n\nhttps:\u002F\u002Funpkg.com\u002Fdexie@latest\u002Fdist\u002Fmodern\u002Fdexie.min.mjs.map\n\n### Typings:\n\nhttps:\u002F\u002Funpkg.com\u002Fdexie@latest\u002Fdist\u002Fdexie.d.ts\n\n# Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Build\n\n```\npnpm install\npnpm run build\n```\n\n## Test\n\n```\npnpm test\n```\n\n## Watch\n\n```\npnpm run watch\n```\n\n\u003Cbr\u002F>\n\nBrowser testing via\u003Cbr\u002F>\n\u003Ca href=\"https:\u002F\u002Fwww.testmuai.com\u002F?utm_medium=sponsor&utm_source=dexiejs\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"testmuai-logo-white.svg\">\n    \u003Cimg src=\"testmuai-logo.svg\" alt=\"TestMu AI (Formerly LambdaTest)\" width=\"147\" height=\"26\">\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n[npm-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fdexie.svg?style=flat\n[npm-url]: https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Fdexie\n","Dexie.js 是一个用于 IndexedDB 的轻量级封装库，旨在简化浏览器中的数据库操作。它支持 TypeScript，提供了简洁的 API 来处理复杂的 IndexedDB 事务，并且能够绕过不同浏览器中 IndexedDB 实现的 bug，从而提供更稳定的用户体验。此外，Dexie.js 还支持跨平台应用开发，包括桌面应用（如 Electron）、移动应用（如 Capacitor）以及纯 PWA 应用。通过 Dexie Cloud 可以实现无需后端的数据同步、认证和协作功能。适用于需要在客户端存储数据并进行离线访问的各种 Web 应用场景。",2,"2026-06-11 02:56:58","top_language"]