{"_id":"lru-cache-idb","_rev":"8-7ef9aa3bca42682914ff90aa1844b8e4","name":"lru-cache-idb","dist-tags":{"latest":"0.5.2"},"versions":{"0.1.0":{"name":"lru-cache-idb","version":"0.1.0","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.1.0","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"2102d8a9e1d42d69fa682b24e485dc4c5286f795","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.1.0.tgz","fileCount":17,"integrity":"sha512-ggDbBJYzxT16B4S+6eYpysZwhlI5hvI+l9zjQsy2fNrD/BdCnhwFWh/bigzn9i8H3bEhK3NQfnt6fUsJUn0agA==","signatures":[{"sig":"MEUCIGQDAnhCUzxLCIym5Lc88kC1aTYSOqCQBXfR5KM1P1v2AiEAzy89FpEl7SBCPUGWs5sKxbIxj15/x8fV7QO37M8wfTw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75376},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"d3c46655d14fd1d63dae157fef91c1d997c44174","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.1.0_1726267513804_0.825354262494949","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"lru-cache-idb","version":"0.2.0","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.2.0","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"887d4b20f148cfaaf5f5b0777bdf3a4c48cdff9e","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.2.0.tgz","fileCount":17,"integrity":"sha512-hoBUcvzFwDs9n0LlVyt3wgFrtQCv5rBptmSGPTpa558iieqbUCy/TCdXgCyvzT50kusMX2YaIKU1EcMqfs7Ugw==","signatures":[{"sig":"MEYCIQD6GZqupPfT7vNm8v/Uu5XbFeRBO9B6Zk/fAhmC5vGHLQIhAI4hbCXXGY5U36FpAi3DaQXRep/dOk0xMH5BML9eYCA3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75655},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"1fb49f8eb0299871db3f043765afaecd3813b0c8","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.2.0_1726773624660_0.46901016728374656","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"lru-cache-idb","version":"0.3.0","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.3.0","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"90af43874aaf5e7195c79e387ed3c1036bc0207d","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.3.0.tgz","fileCount":17,"integrity":"sha512-qdh31G/kAkZenIeg94JxL+Le60tY3IpNRMNBa31Elqu+itVUCTH9vWf0KNNcNy9kfzXKpzyTZxnzeEYTY+i5iw==","signatures":[{"sig":"MEUCIAExTzwUiptpF/16eK1CiUvLVdC8b5pZKlp/wvIQkjoeAiEAizap0EFNOA8+GwQ9Tr0+AoG1XbIK6eRKgVNtj3RGgTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77238},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"d48410d79bf28240021b27254793b7350b0b322c","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.3.0_1726777323364_0.5521287577122003","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"lru-cache-idb","version":"0.3.1","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.3.1","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"33416a748524c62da94d8497bdb652a9e8d2f650","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.3.1.tgz","fileCount":17,"integrity":"sha512-fNQ3Q3bdFEnjhN/MDWHCScTJQbT0SKQL73Ao6cp1sYz15d11HgmTvsUzgLhIMNr+vPw5Er4FCT+25NxVyA5G3w==","signatures":[{"sig":"MEYCIQDc515f1L2/ITsuWqjmTFzgljZtkgNfX14mY7Lq48BNvgIhAN9XtNZtgDsxeCf9sB9v73Hiq4pjzeezstr5B2DJm1Jd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80294},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"afd081b748fd2019dd6c9bae86a080d2c0d6b4ae","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.3.1_1726825647241_0.7284628269164499","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"lru-cache-idb","version":"0.4.0","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.4.0","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"66d8fe8825159d491fd5bf70668a58021f58a7b3","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.4.0.tgz","fileCount":17,"integrity":"sha512-Yf6i72a73QNE/i9jAJayeoDP9pNvkWXwOvujqnVWIseqZ+a4DTNfy2oh/UtKuEFUyESTRn2F5RyRNYIBVuYN2g==","signatures":[{"sig":"MEYCIQDtypntolWZw2ZuygpDvGsBwuTPYAjXBH78Oo9NZIn0JAIhAJcUSO/HIK10uaauEDyss3wqF+gz2SnvTq1HY0XgiXGk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80984},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"816c5ee0f4468f60cdb96f37d42774dffccef218","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.4.0_1726945554745_0.9756332382225619","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"lru-cache-idb","version":"0.5.0","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.5.0","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"98dd633bf4e956fcc3a987307616c6d4b8eb74a9","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.5.0.tgz","fileCount":17,"integrity":"sha512-sJQw7rDXWYEbEYHf+I5jZYLqz+DrJvw13MrHIc4eGUXcaYPFA9OAQKYv3/UiB0XR9FHkzoVDNTH2yGIovBL9GA==","signatures":[{"sig":"MEYCIQD9lJt7oH4ZYUDsFoS3seWVF2w5qONfzXTE33n5cxl2sgIhAK0nbl5XEIZegwldQE+8ouaYxTMjKDCkzzgnuBG18siW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84055},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"fdfe16ed81489e7ba8f92046027fc25b78acf5e8","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.5.0_1727127332204_0.8387161410412327","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"lru-cache-idb","version":"0.5.1","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","_id":"lru-cache-idb@0.5.1","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"homepage":"https://github.com/cnoelle/lru-cache-idb","bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"ava":{"files":["test/**/*"]},"dist":{"shasum":"7ec6d9a037f6b715c747ba276940dce79b177d50","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.5.1.tgz","fileCount":17,"integrity":"sha512-K2Dm7hOU3vW5NezpgfilplwD8kxaV+MhuAmJiL7ZkGEUKtlfoOAW84iQIEuHQ/veBXEpSyxTw3DQBg/Onxjj3w==","signatures":[{"sig":"MEUCIQDLVWQTwRtBKGt4jldIGYeaOR0T3pKgW/zzNc2aMX9KrQIgWjLbx2FT8pHnyLOmZ9WZKgcmaze3EC2PzGdh1LxT278=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84315},"type":"module","types":"./dist/cache.d.ts","exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"gitHead":"1bb091577df9eb875479cf3ccabfffa96599c712","scripts":{"docs":"npx typedoc ./src/cache.ts","test":"ava","build":"del-cli dist && tsc","prepack":"npm run build","build_test":"npm run build && npm run test"},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"repository":{"url":"git+https://github.com/cnoelle/lru-cache-idb.git","type":"git"},"_npmVersion":"10.8.1","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","directories":{},"_nodeVersion":"22.3.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","typedoc":"^0.26.7","typescript":"^5.6.2","fake-indexeddb":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lru-cache-idb_0.5.1_1727131796853_0.7541877459747564","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"lru-cache-idb","version":"0.5.2","description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","type":"module","types":"./dist/cache.d.ts","scripts":{"build":"del-cli dist && tsc","prepack":"npm run build","test":"ava","build_test":"npm run build && npm run test","docs":"npx typedoc ./src/cache.ts"},"exports":{".":{"import":{"types":"./dist/cache.d.ts","default":"./dist/cache.js"}}},"keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"author":{"name":"cnoelle"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cnoelle/lru-cache-idb.git"},"bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"homepage":"https://github.com/cnoelle/lru-cache-idb","devDependencies":{"ava":"^6.1.3","del-cli":"^5.1.0","fake-indexeddb":"^6.0.0","typedoc":"^0.26.7","typescript":"^5.6.2"},"ava":{"files":["test/**/*"]},"_id":"lru-cache-idb@0.5.2","gitHead":"6b3df7abe712374549765be600aa03e88b284595","_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-POlgTgPauh/q/mdh51G828HXqSI+/7KU6tKf59lppkTeTUznztGcqjeUxwjJPVOpKTgWH28DOFtbp9DpXq0zLA==","shasum":"a45e1b6a1baf404ed13aa7d08f73eb0f745f89d4","tarball":"https://registry.npmjs.org/lru-cache-idb/-/lru-cache-idb-0.5.2.tgz","fileCount":17,"unpackedSize":84420,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCfpncuTI5WUpvbqVw63AcOGv+B7KEN7oyirOXN1lcw3AIgF61tjV8i95o93dAhtHXxOMXJQSsufB43v6WYmXdEXlE="}]},"_npmUser":{"name":"cnoelle","email":"npm.cnoelle@posteo.de"},"directories":{},"maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lru-cache-idb_0.5.2_1749804492833_0.2272691324681615"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-13T22:45:13.712Z","modified":"2025-06-13T08:48:13.228Z","0.1.0":"2024-09-13T22:45:13.962Z","0.2.0":"2024-09-19T19:20:24.932Z","0.3.0":"2024-09-19T20:22:03.598Z","0.3.1":"2024-09-20T09:47:27.466Z","0.4.0":"2024-09-21T19:05:54.976Z","0.5.0":"2024-09-23T21:35:32.413Z","0.5.1":"2024-09-23T22:49:57.069Z","0.5.2":"2025-06-13T08:48:13.050Z"},"bugs":{"url":"https://github.com/cnoelle/lru-cache-idb/issues"},"author":{"name":"cnoelle"},"license":"MIT","homepage":"https://github.com/cnoelle/lru-cache-idb","keywords":["lru","lrucache","lru-cache","cache","indexeddb"],"repository":{"type":"git","url":"git+https://github.com/cnoelle/lru-cache-idb.git"},"description":"A least-recently-used (LRU) cache for web applications based on IndexedDB.","maintainers":[{"name":"cnoelle","email":"npm.cnoelle@posteo.de"}],"readme":"# lru-cache-idb\r\n\r\nA least-recently-used (LRU) cache for web applications, based on IndexedDB.\r\n\r\n## Introduction\r\n\r\n[IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) providing in-browser persistence for web applications is an obvious tool for use as a cache. On the other hand, using browser storage for caching leads to specific challenges, such as the fact that multiple instances of a web site (open in multiple tabs, for instance) all access the same storage.\r\n\r\nDesign:\r\n\r\n* *Batched updates*: every read operation on an LRU cache leads to modifications in the stored data, and hence to a write operation. Since a cache may be read very often it is important to provide cheap reads, and hence to avoid writing to persistence on every invocation. In order to minimize the actual writes to IndexedDB, this library batches writes and only persists them periodically (default: every 15s). As a downside, this can lead to data loss if the application is closed in the meantime, or if the same page open in another tab evicts old data.\r\n* *Batched deletes*: data eviction by default is also performed in batches running at most once per specified time interval, 1 minute by default. In the meantime, the cache may grow beyond its specified capacity. \r\n* *Memory layer*: besides the data stored in IndexedDB it is possible to configure an additional memory cache, typically retaining a subset of cached items in memory.\r\n* *Dependency-free*: no third-party Javascript libraries used.\r\n* *Modern Javascript*: implemented in Typescript as an ESM module.\r\n\r\nDemo: https://cnoelle.github.io/lru-cache-idb/\r\n\r\n## Getting started\r\n\r\nInstall: `npm install lru-cache-idb`\r\n\r\nBasic usage:\r\n\r\n```javascript\r\nimport { createCacheIdb } from \"lru-cache-idb\";\r\n\r\nconst cache = createCacheIdb({maxItems: 1000, memoryConfig: {maxItemsInMemory: 100}});\r\nawait cache.set(\"entry1\", {a: 1, description: \"The first entry\"});\r\nawait cache.set(\"entry2\", {a: 2, description: \"The 2nd entry\"});\r\nconst obj = await cache.get(\"entry1\");\r\nconsole.log(\"Object found:\", obj);\r\n```\r\n\r\nIt is possible to instantiate multiple caches on one page, but the database names must differ:\r\n\r\n```javascript\r\nconst cache = createCacheIdb({database: \"MySpecialDb\", maxItems: 1000, memoryConfig: {maxItemsInMemory: 100}});\r\n```\r\n\r\nThis is the database name in IndexedDB, the default being \"LruIdbItemsCache\". The existing databases/caches on a page can be viewed in the browser developer console, e.g. under Web Storage->Indexed DB (Firefox) or Application->Storage->IndexedDB (Chrome).\r\n\r\nAPI documentation: https://cnoelle.github.io/lru-cache-idb/docs/index.html\r\n\r\n## Develop\r\n\r\nAfter cloning the repository, install the dev dependencies: `npm install`.\r\n\r\n### Build\r\n\r\n```\r\nnpm run build\r\n```\r\n\r\n### Demo app\r\n\r\nThis repository contains a sample HTML file *index.html* using the library. For instance, start a dev server using `npx http-server`, then the page will be available in the browser at http://localhost:8080 (check port in console output). Build first, index.html refers to the compiled Javascript files in the *dist/* folder. The demo app can also be found at https://cnoelle.github.io/lru-cache-idb/.\r\n\r\n### Tests\r\n\r\nTests run in NodeJS and hence cannot access an actual browser's IndexedDB implementation. Instead, they run against [fake-indexeddb](https://github.com/dumbmatter/fakeIndexedDB).\r\nTo run all tests, build first, then:\r\n\r\n```\r\nnpm run test\r\n```\r\n\r\nTo run tests in a single file:\r\n\r\n```\r\nnpx ava ./test/testDefaultCache.js\r\n```\r\n\r\nIn order to run a single test in a single file, replace `test(\"...\", async t => {` at the beginning of the test by `test.only(\"...\", async t => {`.\r\n\r\n### Generate documentation \r\n\r\nDocumentation is generated using typedoc. Run\r\n\r\n```\r\nnpm run docs\r\n```\r\n\r\nand find the updated documentation in the *docs* subfolder.\r\n","readmeFilename":"README.md"}