{"name":"dexie","version":"3.2.0-beta.1","description":"A Minimalistic Wrapper for IndexedDB","main":"dist/dexie.js","module":"dist/dexie.mjs","jsnext:main":"dist/dexie.mjs","typings":"dist/dexie.d.ts","jspm":{"format":"cjs","ignore":["src/"]},"repository":{"type":"git","url":"git+https://github.com/dfahlander/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/dfahlander/Dexie.js/issues"},"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":"npm run build && npm run test:typings && npm 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"},"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']","rollup -c ../tools/build-configs/rollup.config.js","rollup -c ../tools/build-configs/rollup.umd.config.js","node ../tools/replaceVersionAndDate.js ../dist/dexie.js","node ../tools/replaceVersionAndDate.js ../dist/dexie.mjs","dts-bundle-generator --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"],"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"]},"engines":{"node":">=6.0"},"homepage":"https://dexie.org","devDependencies":{"dts-bundle-generator":"^5.7.0","just-build":"^0.9.19","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","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","serve-static":"^1.14.1","sorted-json":"^0.2.6","tslib":"^2.1.0","typescript":"^4.2.2","uglify-js":"^3.9.2"},"readme":"Dexie.js\n========\n\n[![NPM Version][npm-image]][npm-url] [![Build Status](https://travis-ci.com/dfahlander/Dexie.js.svg?branch=master)](https://travis-ci.com/dfahlander/Dexie.js)[![Tested with Browserstack](http://dexie.org/assets/images/tested-with-browserstack2.png)](https://www.browserstack.com)\n\nDexie.js is a wrapper library for indexedDB - the standard database in the browser. http://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\n[Tutorial](http://dexie.org/docs/Tutorial)\n\n[API Reference](http://dexie.org/docs/API-Reference)\n\n[Samples](http://dexie.org/docs/Samples)\n\n### Performance\n\nDexie has kick-ass performance. Its [bulk methods](http://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](http://dexie.org/docs/WhereClause/WhereClause), [Table](http://dexie.org/docs/Table/Table) and [Collection](http://dexie.org/docs/Collection/Collection). Dive into the [API reference](http://dexie.org/docs/API-Reference) to see the details.\n\n#### Hello World (ES2016 / ES7)\n```js\nimport Dexie from 'dexie';\n\n//\n// Declare Database\n//\nconst db = new Dexie(\"FriendDatabase\");\ndb.version(1).stores({ friends: \"++id,name,age\" });\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```\n\n#### Hello World (Typescript)\n\n```js\nimport Dexie 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: Dexie.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        this.friends = this.table(\"friends\");\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-------\nhttp://dexie.org/docs/Samples\n\nhttps://github.com/dfahlander/Dexie.js/tree/master/samples\n\nKnowledge Base\n-----\n[http://dexie.org/docs/Questions-and-Answers](http://dexie.org/docs/Questions-and-Answers)\n\nWebsite\n-------\n[http://dexie.org](http://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\nhttps://unpkg.com/dexie@latest/dist/dexie.js\n\nhttps://unpkg.com/dexie@latest/dist/dexie.js.map\n\nhttps://unpkg.com/dexie@latest/dist/dexie.d.ts\n\n\nContributing\n============\nHere is a little cheat-sheet for how to symlink your app's `node_modules/dexie` to a place where you can edit the source, version control your changes and create pull requests back to Dexie. Assuming you've already ran `npm install dexie --save` for the app your are developing.\n\n1. Fork Dexie.js from the web gui on github\n2. Clone your fork locally by launching a shell/command window and cd to a neutral place (like `~repos/`, `c:\\repos` or whatever)\n3. Run the following commands:\n\n    ```\n    git clone https://github.com/YOUR-USERNAME/Dexie.js.git dexie\n    cd dexie\n    npm install\n    npm run build\n    npm link\n    ```\n3. cd to your app directory and write:\n    ```\n    npm link dexie\n    ```\n\nYour app's `node_modules/dexie/` is now sym-linked to the Dexie.js clone on your hard drive so any change you do there will propagate to your app. Build dexie.js using `npm run build` or `npm run watch`. The latter will react on any source file change and rebuild the dist files.\n\nThat's it. Now you're up and running to test and commit changes to files under dexie/src/* or dexie/test/* and the changes will instantly affect the app you are developing.\n\nPull requests are more than welcome. Some advices are:\n\n* Run npm test before making a pull request.\n* If you find an issue, a unit test that reproduces it is lovely ;). If you don't know where to put it, put it in `test/tests-misc.js`. We use qunit. Just look at existing tests in `tests-misc.js` to see how they should be written. Tests are transpiled in the build script so you can use ES6 if you like.\n\nBuild\n-----\n```\nnpm install\nnpm run build\n```\n\nTest\n----\n```\nnpm test\n```\n\nWatch\n-----\n```\nnpm 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","gitHead":"9126292699ca82e7a414d0a1c83395843822156c","_id":"dexie@3.2.0-beta.1","_nodeVersion":"14.16.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-tFkGa/SqGoPXLvxg5tg/fLedbQzPNB7FpOcGB/maRVpNsMAVJ8i/M1Sf47kK4Whqkmm4o3tqqVL1jWEB0LO3vA==","shasum":"85a7a81bf887250f9bfcfcb548d2285162c58a2f","tarball":"http://registry-npm.ywwl.com/dexie/download/dexie-3.2.0-beta.1.tgz","fileCount":14,"unpackedSize":1664407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2It8CRA9TVsSAnZWagAAw1cQAJNGhEBYTHT5iDwdsPx7\nsGiHnTWw3uZedxUgeM8XxZW6QdccMFuy+oocjX1QaKW45+p27vejZPLsjdEN\n5ew+d0oQgJbI3Pb+pD8jdpbU4u9En//tchjsII+S1kOrCIRDvp4DUaGeWA67\ny0cr4hBo7Ip09vILDGYgphk7JWsLLZ/wxWJgBzdiX1rvyJmz6gDN24KKDQ9X\nVAd3WEUQ+x8ClQ/iheXmYJH/3yHiJRIJVqZKd7AdChIKPX541Q3LlbAUTWM/\nspbp/+OWAsjDqfPW05DhpwJAKPTzNvp2W+NOfrlN8KRwN7MDansHR4azJxrl\nNI5jA/QSH2pAr5G6qCVfgLHD38D4Nn7EM94HyWB005I019JscVrOZIAAt6Sa\n0N61cXjZMbQtEOXh+7i4dpVZ1w2UW25DHRdt1etJ95C1jkEPM27jyCtmqbyG\nd4MTg+iSSRtcONam40gEMdSe/FR89Srv8vjVT/h53exOoFAAibduHXwipwzc\nHJZrrot2JQQztVLyCw/r3rarxWOpGiclij7zBi/O0mC7T0ycpQMkHf8t8hmY\nKRUnj9pV+sPXnP9ILFy6AHcdlfwXR71YP7Z8sf9+6tY4VMEVg9/NCMXc3eFh\nJmVNzNAartMXiDvA0dO0+ztKUI8BfkA78Jg6lU4p10Z7swRfEVG5oJPqAg7I\noQOP\r\n=godB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8relgp3h04sOOsz5YnW/ha2acpANc2/sqO61mjaUdRwIgG4I8worIO8JjjW6ppl0bczL88+Iwzpb5mYjz3YConn8="}],"size":396652,"noattachment":false,"key":"/dexie/-/dexie-3.2.0-beta.1.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_3.2.0-beta.1_1624804220021_0.8165529969858267"},"_hasShrinkwrap":false,"publish_time":1624804220198,"_cnpm_publish_time":1624804220198,"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"}}