{"name":"dexie","version":"4.0.1-beta.2","description":"A Minimalistic Wrapper for IndexedDB","main":"dist/dexie.js","module":"dist/dexie.mjs","jsnext:main":"dist/dexie.mjs","exports":{".":{"production":{"browser":"./dist/modern/dexie.min.mjs","module":"./dist/modern/dexie.min.mjs","import":"./import-wrapper-prod.mjs","require":"./dist/dexie.min.js","default":"./dist/dexie.min.js"},"development":{"browser":"./dist/modern/dexie.mjs","module":"./dist/modern/dexie.mjs","import":"./import-wrapper.mjs","require":"./dist/dexie.js","default":"./dist/dexie.js"},"default":{"browser":"./dist/modern/dexie.mjs","module":"./dist/modern/dexie.mjs","import":"./import-wrapper.mjs","require":"./dist/dexie.js","default":"./dist/dexie.js"}},"./package.json":"./package.json"},"typings":"dist/dexie.d.ts","jspm":{"format":"cjs","ignore":["src/"]},"repository":{"type":"git","url":"git+https://github.com/dexie/Dexie.js.git"},"keywords":["indexeddb","browser","database"],"author":{"name":"David Fahlander","email":"https://github.com/dfahlander"},"contributors":[{"name":"Christopher Hunt","email":"https://github.com/chrahunt"},{"name":"Nikolas Poniros","email":"https://github.com/nponiros"},{"name":"Anders Ekdahl","email":"https://github.com/andersekdahl"},{"name":"Yury Solovyov","email":"https://github.com/YurySolovyov"},{"name":"Martin Diphoorn","email":"https://github.com/martindiphoorn"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/dexie/Dexie.js/issues"},"just-build":{"default":["# Build all targets (es5, es6 and test) and minify the default es5 UMD module","just-build release test"],"dexie":["# Build dist/dexie.js, dist/dexie.mjs and dist/dexie.d.ts","cd src","tsc [--watch 'Watching for file changes']","tsc --target es2018 --outdir ../tools/tmp/modern/src/","rollup -c ../tools/build-configs/rollup.config.js","rollup -c ../tools/build-configs/rollup.umd.config.js","rollup -c ../tools/build-configs/rollup.modern.config.js","node ../tools/replaceVersionAndDate.js ../dist/dexie.js","node ../tools/replaceVersionAndDate.js ../dist/dexie.mjs","node ../tools/replaceVersionAndDate.js ../dist/modern/dexie.mjs","dts-bundle-generator --inline-declare-global --inline-declare-externals -o ../dist/dexie.d.ts public/index.d.ts","node ../tools/prepend.js ../dist/dexie.d.ts ../tools/build-configs/banner.txt","node ../tools/replaceVersionAndDate.js ../dist/dexie.d.ts"],"release":["# Build ES5 umd module as well as the es6 module.","just-build dexie","node tools/replaceVersionAndDate.js dist/dexie.d.ts","# Minify the default ES5 UMD module","cd dist","uglifyjs dexie.js -m -c negate_iife=0 -o dexie.min.js --source-map url=dexie.min.js.map","# Minify modern bundle","cd modern","terser --comments false --compress --mangle --module --source-map url=dexie.min.mjs.map -o dexie.min.mjs -- dexie.mjs"],"dev":["# Build ES5 module and the tests","just-build dexie test"],"gzip":["# Optionally gzip to find the size of the minified & gzipped version","gzip dist/dexie.min.js -k -f -9"],"test":["# Build the test suite.","cd test","tsc [--watch 'Watching for file changes']","rollup -c ../tools/build-configs/rollup.tests.config.js"]},"homepage":"https://dexie.org","devDependencies":{"@lambdatest/node-tunnel":"^4.0.1","dts-bundle-generator":"^5.9.0","just-build":"^0.9.24","karma":"^6.1.1","karma-browserstack-launcher":"^1.5.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-mocha-reporter":"^2.2.5","karma-qunit":"^4.1.1","karma-webdriver-launcher":"^1.0.8","qunit":"^2.10.0","qunitjs":"^1.23.1","rollup":"^2.40.0","rollup-plugin-cleanup":"^3.2.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-sourcemaps":"^0.6.3","rxjs":"^6.6.6","safari-14-idb-fix":"^3.0.0","serve-static":"^1.14.1","sorted-json":"^0.2.6","terser":"^5.3.1","tslib":"^2.1.0","typescript":"^5.0.4","uglify-js":"^3.9.2"},"scripts":{"build":"just-build","watch":"just-build --watch","clean":"rm -rf tools/tmp && rm dist/*.js && rm dist/*.map && rm dist/*.ts && rm dist/*.mjs","test":"pnpm run build && pnpm run test:typings && pnpm run test:unit","test:unit":"karma start test/karma.conf.js --single-run","test:typings":"tsc -p test/typings-test/","test:debug":"karma start test/karma.conf.js --log-level debug","test:ltcloud":"cross-env LAMBDATEST=true npm run test:ltTunnel & sleep 10 && npm run test:unit","test:ltTunnel":"node test/lt-local"},"readme":"Dexie.js\n========\n\n[![NPM Version][npm-image]][npm-url] ![Build Status](https://github.com/dexie/Dexie.js/actions/workflows/main.yml/badge.svg)\n\nDexie.js is a wrapper library for indexedDB - the standard database in the browser. https://dexie.org\n\n#### Why?\nDexie solves three main issues with the native IndexedDB API:\n\n 1. Ambiguous error handling\n 2. Poor queries\n 3. Code complexity\n\nDexie provides a neat database API with a well thought-through API design, robust error handling, extendability, change tracking awareness and extended KeyRange support (case insensitive search, set matches and OR operations).\n\n#### Hello World\n\n```html\n<!doctype html>\n<html>\n <head>\n  <script src=\"https://unpkg.com/dexie@latest/dist/dexie.js\"></script>\n  <script>\n   //\n   // Declare Database\n   //\n   var db = new Dexie(\"FriendDatabase\");\n   db.version(1).stores({\n     friends: \"++id,name,age\"\n   });\n\n   //\n   // Manipulate and Query Database\n   //\n   db.friends.add({name: \"Josephine\", age: 21}).then(function() {\n       return db.friends.where(\"age\").below(25).toArray();\n   }).then(function (youngFriends) {\n       alert (\"My young friends: \" + JSON.stringify(youngFriends));\n   }).catch(function (e) {\n       alert (\"Error: \" + (e.stack || e));\n   });\n  </script>\n </head>\n</html>\n```\nYes, it's that simple. \n\nAn equivalent modern version (works in all modern browsers):\n\n```html\n<!doctype html>\n<html>\n <head>\n  <script type=\"module\">\n   import Dexie from \"https://unpkg.com/dexie@latest/dist/modern/dexie.mjs\";\n   //\n   // Declare Database\n   //\n   const db = new Dexie(\"FriendDatabase\");\n   db.version(1).stores({\n     friends: \"++id,name,age\"\n   });\n\n   //\n   // Manipulate and Query Database\n   //\n   try {\n     await db.friends.add({name: \"Josephine\", age: 21});\n     const youngFriends = await db.friends.where(\"age\").below(25).toArray();\n     alert (`My young friends: ${JSON.stringify(youngFriends)}`);\n   } catch (e) {\n     alert (`Error: ${e}`);\n   }\n  </script>\n </head>\n</html>\n```\n\n[Tutorial](https://dexie.org/docs/Tutorial)\n\n[API Reference](https://dexie.org/docs/API-Reference)\n\n[Samples](https://dexie.org/docs/Samples)\n\n### Performance\n\nDexie has kick-ass performance. Its [bulk methods](https://dexie.org/docs/Table/Table.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```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```\nThis is a mix of methods from [WhereClause](https://dexie.org/docs/WhereClause/WhereClause), [Table](https://dexie.org/docs/Table/Table) and [Collection](https://dexie.org/docs/Collection/Collection). Dive into the [API reference](https://dexie.org/docs/API-Reference) to see the details.\n\n#### Hello World (Typescript)\n\n```js\nimport Dexie, { Table } from 'dexie';\n\ninterface Friend {\n    id?: number;\n    name?: string;\n    age?: number;\n}\n\n//\n// Declare Database\n//\nclass FriendDatabase extends Dexie {\n    public friends!: Table<Friend, number>; // id is number in this case\n\n    public constructor() {\n        super(\"FriendDatabase\");\n        this.version(1).stores({\n            friends: \"++id,name,age\"\n        });\n    }\n}\n\nconst db = new FriendDatabase();\n\ndb.transaction('rw', db.friends, async() => {\n\n    // Make sure we have something in DB:\n    if ((await db.friends.where({name: 'Josephine'}).count()) === 0) {\n        const id = await db.friends.add({name: \"Josephine\", age: 21});\n        alert (`Addded friend with id ${id}`);\n    }\n\n    // Query:\n    const youngFriends = await db.friends.where(\"age\").below(25).toArray();\n\n    // Show result:\n    alert (\"My young friends: \" + JSON.stringify(youngFriends));\n\n}).catch(e => {\n    alert(e.stack || e);\n});\n```\n\nSamples\n-------\nhttps://dexie.org/docs/Samples\n\nhttps://github.com/dexie/Dexie.js/tree/master/samples\n\nKnowledge Base\n-----\n[https://dexie.org/docs/Questions-and-Answers](https://dexie.org/docs/Questions-and-Answers)\n\nWebsite\n-------\n[https://dexie.org](https://dexie.org)\n\nInstall over npm\n----------------\n```\nnpm install dexie\n```\n\n\nDownload\n--------\nFor those who don't like package managers, here's the download links:\n\n### Legacy:\nhttps://unpkg.com/dexie@latest/dist/dexie.min.js\n\nhttps://unpkg.com/dexie@latest/dist/dexie.min.js.map\n\n### Modern:\nhttps://unpkg.com/dexie@latest/dist/modern/dexie.min.mjs\n\nhttps://unpkg.com/dexie@latest/dist/modern/dexie.min.mjs.map\n\n### Typings:\nhttps://unpkg.com/dexie@latest/dist/dexie.d.ts\n\n\n\nContributing\n============\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\nBuild\n-----\n```\npnpm install\npnpm run build\n```\n\nTest\n----\n```\npnpm test\n```\n\nWatch\n-----\n```\npnpm run watch\n```\n\n\n[npm-image]: https://img.shields.io/npm/v/dexie.svg?style=flat\n[npm-url]: https://npmjs.org/package/dexie\n","readmeFilename":"README.md","_id":"dexie@4.0.1-beta.2","_integrity":"sha512-JYOH1XsskTSWu1I6PrKu72xUOmDphdEEbQDYslPq4cC4kRcQapAZn3vpiWN4XgOXuvbhe0bfC1OkPS46PHVVLw==","_resolved":"/private/var/folders/0y/5wjf8hf145b6sksj8rmqbjw40000gp/T/63579e1028790e5e4808fb9b57483724/dexie-4.0.1-beta.2.tgz","_from":"file:dexie-4.0.1-beta.2.tgz","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-JYOH1XsskTSWu1I6PrKu72xUOmDphdEEbQDYslPq4cC4kRcQapAZn3vpiWN4XgOXuvbhe0bfC1OkPS46PHVVLw==","shasum":"0258e2477b92d1779b74cd20544f197aaf1a20a9","tarball":"http://registry-npm.ywwl.com/dexie/download/dexie-4.0.1-beta.2.tgz","fileCount":24,"unpackedSize":2914162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbQQOdn6aPR0I63wH1IxxfA/QGv4nyb+36+RiUDDCQJgIhAKJrFR8tghcyY/1T0ugiNjjnvpGtqN/TEwZmjGW8wRfH"}],"size":717602,"noattachment":false,"key":"/dexie/-/dexie-4.0.1-beta.2.tgz"},"_npmUser":{"name":"dfahlander","email":"david.fahlander@gmail.com"},"directories":{},"maintainers":[{"name":"anders.ekdahl","email":"anders.ekdahl@gmail.com"},{"name":"dfahlander","email":"david.fahlander@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dexie_4.0.1-beta.2_1701261121907_0.24727814427598394"},"_hasShrinkwrap":false,"publish_time":1701261122137,"_cnpm_publish_time":1701261122137,"dist-tags":{"dev":"4.4.7","latest":"4.4.7","latest-3":"3.2.7","latest-3.0.x":"3.0.4","pr2297":"4.4.2-pr2297.4"}}