{"id":20199917,"url":"https://github.com/fortunejs/fortune-indexeddb","last_synced_at":"2025-10-10T15:34:07.512Z","repository":{"id":12221462,"uuid":"71253547","full_name":"fortunejs/fortune-indexeddb","owner":"fortunejs","description":"IndexedDB adapter for Fortune.js.","archived":false,"fork":false,"pushed_at":"2024-02-21T02:22:24.000Z","size":178,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T09:52:57.364Z","etag":null,"topics":["indexeddb"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fortunejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-18T13:53:54.000Z","updated_at":"2024-01-26T11:22:01.000Z","dependencies_parsed_at":"2022-08-07T06:16:48.900Z","dependency_job_id":null,"html_url":"https://github.com/fortunejs/fortune-indexeddb","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-indexeddb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-indexeddb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-indexeddb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-indexeddb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortunejs","download_url":"https://codeload.github.com/fortunejs/fortune-indexeddb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247810512,"owners_count":20999925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indexeddb"],"created_at":"2024-11-14T04:40:28.981Z","updated_at":"2025-10-10T15:34:07.431Z","avatar_url":"https://github.com/fortunejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortune IndexedDB\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/fortunejs/fortune-indexeddb/test.yml)\n[![npm Version](https://img.shields.io/npm/v/fortune-indexeddb.svg?style=flat-square)](https://www.npmjs.com/package/fortune-indexeddb)\n[![License](https://img.shields.io/npm/l/fortune-indexeddb.svg?style=flat-square)](https://raw.githubusercontent.com/fortunejs/fortune-indexeddb/master/LICENSE)\n\nThis is an IndexedDB adapter for Fortune.js. Various performance and compatibility optimizations are included:\n\n- Runs in a Web Worker so that database operations don't [block the main thread](https://nolanlawson.com/2015/09/29/indexeddb-websql-localstorage-what-blocks-the-dom/), and uses [MessagePack](http://msgpack.org) for [messaging](https://developer.mozilla.org/en/docs/Web/API/Worker/postMessage).\n- Lazy loads records as they're requested and keeps them in memory.\n- Primary keys are universally unique, which solves some [compatibility problems](https://www.raymondcamden.com/2014/09/25/IndexedDB-on-iOS-8-Broken-Bad).\n\n```sh\n$ npm install fortune-indexeddb\n```\n\n\n## Usage\n\nThis module works in web browsers only, and falls back to memory if IndexedDB is not available:\n\n```js\nconst fortune = require('fortune')\nconst indexedDBAdapter = require('fortune-indexeddb')\n\nconst store = fortune(recordTypes, {\n  adapter: [ indexedDBAdapter, {\n    // Name of the IndexedDB database to use. Defaults to `db`.\n    name: 'db',\n    // These are optional to implement, if storage compression is needed.\n    compress: uint8array =\u003e uint8array,\n    decompress: uint8array =\u003e uint8array,\n  } ]\n})\n```\n\n\n## License\n\nThis software is licensed under the [MIT license](https://raw.githubusercontent.com/fortunejs/fortune-indexeddb/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-indexeddb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortunejs%2Ffortune-indexeddb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-indexeddb/lists"}