{"_id":"@codelake/browserdb","_rev":"6-5694b4e8dbea9180bab42f4205381c81","name":"@codelake/browserdb","dist-tags":{"latest":"0.4.3"},"versions":{"0.1.2":{"name":"@codelake/browserdb","version":"0.1.2","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest","test:watch":"jest --watchAll","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/local-database.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/local-database/issues"},"homepage":"https://github.com/codelakegmbh/local-database#readme","devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-typescript":"^7.3.3","@types/jest":"^24.0.11","babel-jest":"^24.5.0","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"[^.]+\\.spec\\.ts$"},"gitHead":"b8e0bd450d2a562e650b6e675c51c2cce956fa78","_id":"@codelake/browserdb@0.1.2","_nodeVersion":"10.15.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-apUF/5YugeKPadwaJcQXaNwFlsuIVm96UorY9mnLXj6OZ2Li33/K9/B4+RKJSGzB4R5rX0V0ItM3I9yi8vR0Sg==","shasum":"04d64436d6a151f4331f34969155dad7b0102785","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.1.2.tgz","fileCount":21,"unpackedSize":32716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoS2QCRA9TVsSAnZWagAAXxkP/A9OGDJTnHXOsNnSOb7J\nH4BUOwEqb7j5HWoa4Q+D44d1EUP7oelmlZreDTJcHTq0K5yNdpMuVBq+u+mJ\ntVTvIGYBBlvrv5F8jzgFKk62zzu7qqTNS7lTUXPuI2lBBIQBi2npb0PJe6uk\nE/3Q9BtLOosY/Kt7Oug2wOGAzsunJUbi0g/MaNXKGRanCfvcNrUJhstGjJJf\n7kL3dZqOrq9Y96GuCb/zMCRGNbaqzob9RDwwFtgDk82yJy6o8vHugdIOhWNT\n4VLv3lg62H9DP9dcso9zUyjWqbU4rrSWBGX8zjEbQXLOMd/E9FQDeDYItR/4\nekuJVGT14yOtfs/huiwMXXJJomQKjOLtWZGXQFF/JmhRBJIDG15+0yR1qdz5\n0ndwiqtsImMIBAgLqCmEd4GASUIf5/rpRapG8eqddzwnbIe0ucPXSbGx9yBs\n3wMMDWUJN6PeDNwvKDwXZGFBkgNBKbnFiX07mY0JNKAH/xvuy/BlaIFJLweM\nEGYJqLIWXw6h2RmwBaHSB7+1rjcFEf1ml1HTqvQvuMspe1Fs9ApmOYdAZMI1\n9gGK1i8fUtYTHBLgir8nj/5O0ApQK3A5+GRJtyW9jNsbQdHaYudEjVh0S7eV\nElDQHHWgwfxH1hlRLGbJAKU19zNT+P+lYOJoSVuph3aQElOwsu/Kradv/bAP\nGPmb\r\n=kFCd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCMbk1gwh32OTkv4ZJao0RATQuT6IzDxe8W9KN0KKCgAIhAIo0DUmq9xnyhBPJ5Mrz9NqrUkFZiu5Qf0oXDypvLGdi"}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.1.2_1554066831723_0.17952275307038845"},"_hasShrinkwrap":false},"0.2.0":{"name":"@codelake/browserdb","version":"0.2.0","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest","test:watch":"jest --watchAll","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/local-database.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/local-database/issues"},"homepage":"https://github.com/codelakegmbh/local-database#readme","devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-typescript":"^7.3.3","@types/jest":"^24.0.11","babel-jest":"^24.5.0","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"[^.]+\\.spec\\.ts$"},"gitHead":"900ba70bf77f8e8e0f3b57b53c72a7f2247898bf","_id":"@codelake/browserdb@0.2.0","_nodeVersion":"10.15.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JHjKRG2pN/m11Nj5RQBNRrtpx4pINHAiHIs6yLKX7+MjbvPG7/ADw6bn6zcrUNGmC75aR+jU+TC8gObQHKxGpQ==","shasum":"248d42b6daae4084f6f7aca561b1efe6dbb05abe","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.2.0.tgz","fileCount":21,"unpackedSize":33141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoTYbCRA9TVsSAnZWagAA++IQAJOLhET12ky4ec6MpO0E\nZRjwQb6p3Pu6CGpHk536mv1yuKgmMA2gQKIpAys8GkBlzcEyXp9nkDMCap2G\nlSd7vEpDlZsqGUGRtXuPIUJPYc+iKKh3MZew+/g6/+tTtNZfDLKgD8N3l6cC\nabQGDJYpL2n6gy2ba0uO54m8e4KnQPhQTcEw5E19Ld2a2ZCsAX9iBahGXazJ\nThrfYQUCPyIaCMxPV0DjUIvGiDNeerGcFjXFgL800Ryst8SyEyzfNzrdD+tY\nm6k/x1KUZRS8PVb2/XqMybOQ1m9q4D7l5Fuqt1Bb7nT+eTr3ehF4AGH0Mq1U\nz7i2ouWxXcTEnTPURCIpjoKp0BPx3RBZRvfODtaGMdxM0eKF2zzbfcg4HrZV\nONR5VSxPlvs+MfuHaX9mUUeZTJQLjYQjb7Qtkc+a+t/SY+QivS+yGH+VAJgS\nxomTM5wD0xQKaqvUOBXBvHG4A7B0uTXjiL4uO+Y8+nSgQQLHEwiipRNDmU+W\n0CgG89sbuYymaXkDkNT2pRZg65p9rQH98e+T6JaVHSHzhNZmVKlfrf06ylnN\niXAlCWwvZS2pDaEh2uGAQe5XlUxAMOf5eKE6qXvbXIcEzwBzpgArJPRMSCI2\nEPBFGAE7O2eWAQJNQKC5p3WStb3T7LXUz9ApVQuMdC03rDFpXh3LQ28jtbxt\nznQW\r\n=4zrg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGMFflPma5O2dyZ+Ih4e0C5sAWmLI1PwZ2KM0PeqqKIQIgP5yD9zd3Y8qyBkrbsnE/tjxvZhKLoMJ0+jQdLcMDX/Y="}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.2.0_1554069018862_0.8585708642884764"},"_hasShrinkwrap":false},"0.3.0":{"name":"@codelake/browserdb","version":"0.3.0","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest --coverage","test:watch":"jest --watchAll --coverage","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/local-database.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/local-database/issues"},"homepage":"https://github.com/codelakegmbh/local-database#readme","devDependencies":{"@types/jest":"^24.0.11","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000","ts-jest":"^24.0.2"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"\\.spec\\.ts$","transform":{"\\.ts$":"ts-jest"},"globals":{"ts-jest":{"tsConfig":"tsconfig.test.json"}}},"gitHead":"2d94b32a44ea83851786d4f2b4bf7303af66a2c3","_id":"@codelake/browserdb@0.3.0","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-FwYXe3l6DC5OiteSVcRBO59Exz8PS5GP1E1eGbzcfCLiI1E6sCAh9r+ddfSKFzzBzX/QCz6btuSKZgjiqzWxsg==","shasum":"a4572bd24a62692b4b7bf5d66abb74e8737c8137","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.3.0.tgz","fileCount":31,"unpackedSize":40531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrmUyCRA9TVsSAnZWagAAtaoP/1cUN3f4Ji3kdLluMWO1\nz+WB3fV8GC3m4EBh7FC5AWkEeZed0F+/Cu/+k55J5qECij3J99t1487qZpzh\nv0h+HWE5nLTwJY6GMFbiSEy2GzOExalEoOuw2sWOWKccD4sh9e6KjO09QqHd\n4P0Q/NcB+8juAvfwM/mGt7DMm45fEskhkThfEjkFa3y5xyU9WCQ3UNjdQZVA\n5+jAsjfrlCoD72JaSgh/E1BH+hFl8dyDHVsXW5I0WoGFN4k2bw7CyusP9T2m\nEsfjsvEQGcyQHXhYui09aq3ABvBi63SN33t1YkPG9MJErwgG2mK9ppUMqNJd\n4g6y8fMlNz+68UymPyzQFt9ucxXILoXTLKy3RPQETxzDcLuuTYNaPxpnL6UW\nV2zsC4+HY03WO+jhGSr8Hk4qnMDTvb8H4S9UTmfjWCZE+JeBda5lIXsA0jxG\nLGGvUBoFbS1JKnzfHuxKYpPCCwR2gqwAN6U1oU9U/x0QPW8zmCLKKKNeJnAL\n23+b+TUaqKgEeBU8FlUGx2WpyvwR28y01hzF2QM0m/r+XWRjodK36yhp+kcq\nyn+sIlUJSxfrHK/tKRPDwLIC3dqw2amJDZChjcn6BNJUqBrpvOxFcT7exoTC\nTrJ3dl7jEiSVQRgmg7txYDpuqtuzAiWnY0uWXp330xa2gUYkOCIaAnss/x/v\nXkG6\r\n=i0ev\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChUQUTlLKQ2EDTYw5xI2Eep6jzIvmEOXFWlUhpqZ8syQIhAPmcHitaJJWpnrxNoLEoXgfd8248tLdKNbrGm/OktXar"}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.3.0_1554933041381_0.2805353432850739"},"_hasShrinkwrap":false},"0.4.1":{"name":"@codelake/browserdb","version":"0.4.1","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest --coverage","test:watch":"jest --watchAll --coverage","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/local-database.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/local-database/issues"},"homepage":"https://github.com/codelakegmbh/local-database#readme","devDependencies":{"@types/jest":"^24.0.11","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000","ts-jest":"^24.0.2"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"\\.spec\\.ts$","transform":{"\\.ts$":"ts-jest"},"globals":{"ts-jest":{"tsConfig":"tsconfig.test.json"}}},"gitHead":"bdfec77424992edb31820c513a8f966f181cbc90","_id":"@codelake/browserdb@0.4.1","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jTJBa1Y2trCTnp539pvFVNUQSqZBVLaLusbhj6SFZvBRDKDoNjTPosbM3znV7XzJF12WqkjxvaS5RQUrPmuo8g==","shasum":"fd3a540d0efc42c7d52d67c997e1ecc2b5a9fcfa","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.4.1.tgz","fileCount":31,"unpackedSize":51021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcs25ACRA9TVsSAnZWagAAv/AP/3iHqJBZcNRvWajOHmdA\n28NfhySuhr8AZ8kZJyHzqcjkdw8MfCvAiezfVsQcWOiFNbTeQGZGTezDyyrW\n4Afigk8T6Wqafg4swtDYJy6J2ACc0p1kwBn1qyOif8cShZoj4LwL/BeAGwdD\n5La3yRp02updNrmzAPVefQOZM+K0Q982qnO23UytloceyX1LFAxibwrsDyjc\nrtLec9QBRzbabHeDpXow2MVgmuDewCIWNrkdH1B3+A5EA+P3TTKPtkJ5MOWC\naMbsy535OKHQIw4oQsMVxbnIF44Agbf0uHS23G9MdXc7gJIOxpgph8mMwIlq\nNjafRXAYoBgYojLZrKseSWHQqrDBeYd0EIIaLNCLkfnPlGDGXMh3D/++ZmxR\n/I5XICsIDV2bEabvheNjRhI1Qne6zLymEA7HfoU5c00lZUTgFbR3fCY3QEHn\nRZzUWXrfEpsiZBhse61XeiXHSwrxCqDnJgDnq4WhkLUANaiYt0nz7XuYzJo2\nbouNtOUHy2C8LJ1K/+az8MJRkE0mTlC6BbX2/dAuHhqgtcOwfF590mUgn4Xf\np809gNbdk2Ao40zaJ2N9BVDqpIeMIoDfTyqGeEy0txI1dDSRxjU5fd2rArOO\nL7hh8o5GSVp91n/pIxj8h13nUt4kgFwg6hTVGG2uhsPvkDt5x5wcM6FWUva5\n0LQS\r\n=s2aw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZnib40f74YU9GMNSuas7wxQ2Jz4kT8vdzH+ufh+j1qwIhAPOfjfZA3ZyrK6UUqX4bhRC99VHgeG+I9kdZepQkbdQ1"}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.4.1_1555263039380_0.6355529199998096"},"_hasShrinkwrap":false},"0.4.2":{"name":"@codelake/browserdb","version":"0.4.2","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest --coverage","test:watch":"jest --watchAll --coverage","prepublish":"rm -r dist && tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/local-database.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/local-database/issues"},"homepage":"https://github.com/codelakegmbh/local-database#readme","devDependencies":{"@types/jest":"^24.0.11","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000","ts-jest":"^24.0.2"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"\\.spec\\.ts$","transform":{"\\.ts$":"ts-jest"},"globals":{"ts-jest":{"tsConfig":"tsconfig.test.json"}}},"gitHead":"b1839807874d2d8e40c22386675f44ed8493dc0a","_id":"@codelake/browserdb@0.4.2","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-13Xw+QDKUES4yJ/eOpa/yHYbTUzIG7N1oeVS5QET87RW3LuVI8xZDQfBEbCldZxzhx/rbPCK80XHlT3AIFX6vw==","shasum":"fe9adaf353135c5b5c4466d5c34ade6fd4c721b0","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.4.2.tgz","fileCount":31,"unpackedSize":51035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcs29ECRA9TVsSAnZWagAAq1MP/A7FozffuDQbyBilCSsc\ns2ToAWvTTXZnSjRgzm06kRSC3BEnCWLnEm/lF5W62VTN55PlkHmQJk5v/x+l\nnwSH/WkMJ8CLbTbQjV5eSVrUtg/Rc4skrdlm4SaeTxOgRVfHzmKzhfvgOQz7\nf8C03eMrmNNKDZK6ZYbv6MMC6BBuNIeSClIJsai1psfnrf+glk+nWZLSnaIQ\nNIMJjZXgnalpH3ZaHQXkqC+y0WuFS27eQ9yJjh6WnFYUeFVL/jCxP20t/I2q\ngcX9zZw16f/QHAdZXGxRnBugg+lwDYf1RZy+ZkYNvCMC3++G1QhylPkLgwi3\nqmfyF4sKIedMjFXtAzYEiPrS8/dyTWF8mdBTGf0kYXptwQ9Pt13EVWYFEYys\niLV+4ZGG8WLIxoslxXoaq3sGoiMFxzw+PaTD39Q27elneF+tApaswgUTuZZu\n/7+J4BquRsuvcQJlJHa9WmS7kkFBVeOYM5ri8If4MNlbfVCurCwNftEE0pgn\n5ppsjPJr8JNvVT0t1MPH4JpU3xd1dHL7dHQZS/YOAVyuCao7IApns7mjasMY\nnKq/rgXoYoJmZW6TdpNt92eheHwSWTEtHILRzTNdM+jMAEN+mYC5xqIPT9q6\nqTGOT1CW31uiiOn+GJepdvhcO7bp55BnKJuOuVx1t+u8DzxvwCirqDYfaO+P\nxrD5\r\n=Lnpz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIsA9r/h6yWx+koiPnODDkTDu7nxEJNerMSTZ32Vz0iAiA1lJhWnVZWKgEloFuFJ+sKFfGZYisHa5La8AA1cKrYSQ=="}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.4.2_1555263300021_0.4628127705862515"},"_hasShrinkwrap":false},"0.4.3":{"name":"@codelake/browserdb","version":"0.4.3","description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","main":"dist/index.js","scripts":{"test":"jest --coverage","test:watch":"jest --watchAll --coverage","prepublish":"rm -r dist && tsc"},"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/browserdb.git"},"keywords":["localstorage","browser"],"author":{"name":"Jörn Neumeyer"},"license":"LGPL-3.0","bugs":{"url":"https://github.com/codelakegmbh/browserdb/issues"},"homepage":"https://github.com/codelakegmbh/browserdb#readme","devDependencies":{"@types/jest":"^24.0.11","jest":"^24.5.0","nodemon":"^1.18.10","typescript":"^3.3.4000","ts-jest":"^24.0.2"},"jest":{"clearMocks":true,"coverageDirectory":"coverage","testRegex":"\\.spec\\.ts$","transform":{"\\.ts$":"ts-jest"},"globals":{"ts-jest":{"tsConfig":"tsconfig.test.json"}}},"gitHead":"96b891a7ef4074b8d1919ac0260bf8c6426847e2","_id":"@codelake/browserdb@0.4.3","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-l+x0Ffif9sef5tSS/fi8ep8wCV23H3omJ5jST6ZCwTERhM2MFZ+A4zoSUkv8mUXDv5vlK8ZPWZzcG5Cbl/2w9g==","shasum":"b1b397207070f066aaf295a5977760213ffa304c","tarball":"https://registry.npmjs.org/@codelake/browserdb/-/browserdb-0.4.3.tgz","fileCount":31,"unpackedSize":51020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcs3FPCRA9TVsSAnZWagAAcS0P/1ZQU+Iua+tFZ80dKz0H\n8kZIHp7CHyik17d8zADk217Jt6eQAFbg8vBRsn6uW+bee5bO3+/S0fKwlFLV\nnmdDG5OhIOIqqc/MiSuHDDqZJiST/DKd0XkyYbdejgxQG3BYjbdhYfVhqUQL\naE7We6wUCHU3c8KtJ0iMVaQoDKCQXQR98Vw0612rx3UGvq3VuxXIKLGDMAhM\nipqoRM3Imb2bc3pk7HFCOmK7nlVDogkags1fezvVJdYHLRNNIzWPzZ/rFNvU\ndgpviZF6bVbGUVFfjTvcObVQPo653glxxuGuT4+zsH/RVhtP4c9RU3G7g3Mt\noo/NlQEiJ53Z/kue1AyWIx9UtTTbcBZvCue2oARZU/UZW+YZ+GMs37sap7Du\nwkSNQlQh3c2r0Rpu8FyBULBLZjJ7yphJGoI9za8V9mxuKnb+CRsUdr7sjSbS\nQaaB8QtbrLaCAXS11s9rhgiHuJZKtAwOnL6FeM6Tq8R17Q2PptXgwYtWt2wp\nyj/UF2N7yjMnBfEThUo4RmjDsRgSAZ6peTd0Hp0usmgllbzjiIzylKcHrBjF\nPRZ1P3QLB1ehFDUA3uQLkKOmK2sg1ZNZUcOgSTGLZWrHcmDnfg2g/1SEYPwY\nF5WiDcgbud5M1SS4UMf7T0U+UWHWdlPWEh659+Chlit1toNQtW7Nu+88W9+T\nSSeF\r\n=AWMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKbQQguBxjoP7SW/UA0SYXoZR24BSL8IN2Cgga72ia6AiB1FnmOOoW13sW7BoctrV4xza+2TxlkeHy63QYxQHyo5w=="}]},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"_npmUser":{"name":"codelake","email":"business@code-lake.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/browserdb_0.4.3_1555263822801_0.9226094008666261"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-31T21:13:51.538Z","0.1.2":"2019-03-31T21:13:51.854Z","modified":"2022-04-05T00:03:14.939Z","0.2.0":"2019-03-31T21:50:19.004Z","0.3.0":"2019-04-10T21:50:41.679Z","0.4.1":"2019-04-14T17:30:39.495Z","0.4.2":"2019-04-14T17:35:00.118Z","0.4.3":"2019-04-14T17:43:42.941Z"},"maintainers":[{"name":"codelake","email":"business@code-lake.com"}],"description":"A wrapper around localStorage to enable document like local storing of objects in the browser.","homepage":"https://github.com/codelakegmbh/browserdb#readme","keywords":["localstorage","browser"],"repository":{"type":"git","url":"git+https://github.com/codelakegmbh/browserdb.git"},"author":{"name":"Jörn Neumeyer"},"bugs":{"url":"https://github.com/codelakegmbh/browserdb/issues"},"license":"LGPL-3.0","readme":"# browserdb\nbrowserdb is a wrapper around localStorage to enable document like local storing of objects in the browser.\nIt makes persisting and loading persisted objects inside web apps very easy and convenient.\n\nIt should mainly be used in PWAs to store state.\nIt should __NOT__ be used to store large amounts of data as it will not scale efficiently in regard to memory and speed!\nSo be careful how you use it or how a user of your application could use it and possibly dump it with too much data.\n\n__Note:__ The master branch will contain work that is still work-in-progress.\nSo if you want to download a stable version of the library source code please get it from the GitHub release page.\n\n## Content\n\n* [Installation](#installation)\n* [Retrieving a database](#retrieving-a-database)\n* [Retrieving a collection](#retrieving-a-collection)\n* [Meta Programming](#meta-programming)\n* [Collection Usage](#collection-usage)\n  * [Inserting data](#inserting-data)\n  * [Selecting data](#selecting-data)\n  * [Deleting data](#deleting-data)\n  * [Updating data](#updating-data)\n  * [Clearing a collection](#clearing-a-collection)\n* [Events](#events)\n  * [insert event](#insert-event)\n  * [update event](#update-event)\n  * [delete event](#delete-event)\n  * [clear event](#clear-event)\n  * [remove listeners](#remove-listeners)\n* [Some Q&A](#some-qa)\n\n## Installation\nbrowserdb can be installed via `npm i @codelake/browserdb`\n\n## Retrieving a database\nYou can just create it manually, or use the `BrowserDbManager` in order to reduce memory usage and keep data in your app in sync.\n```typescript\nimport { BrowserDb, BrowserDbManager } from '@codelake/browserdb';\n// or via require and object destructuring\nconst { BrowserDb, BrowserDbManager } = require('@codelake/browserdb');\n// or one by one via require\nconst BrowserDb = require('@codelake/browserdb').BrowserDb;\nconst BrowserDbManager = require('@codelake/browserdb').BrowserDbManager;\n\nconst db = new BrowserDb('foo');\n\n// or via the BrowserDbManager singleton\n\nconst db = BrowserDbManager.getInstance().getDatabase('foo');\n```\nIn either case you get a valid `BrowserDb` instance.\nThe only difference is, the instance from the `BrowserDbManager`'s `getDatabase(name)`\nmethod will be kept in memory, so the exact instance can be shared across multiple spots in your code.\n\nIt is recommended to use the `BrowserDbManager` as the corresponding data from the actual `localStorage` is only read __ONCE__ at instantiation time and not synced afterwards!\n\n## Retrieving a collection\nThe database on its own does not do anything yet.\nIn order to read or write data you have to get a `BrowserDbCollection`.\nYou can easily do so by calling the `getCollection(name)` method with the name of the desired collection.\n```typescript\nconst collection = db.getCollection('bar');\n```\nIf the collection was never accessed before, it will be instantiated for you.\nDuring the instantiation the collection will read the data contained in the `localStorage` field where the key is the returned value of the collection's `collectionName()` method.\n\nAfter the first instantiation, the data inside `localStorage` won't be read again but only written to!\n\n## Meta Programming\nBy now you've seen some ways to retrieve a `BrowserDbCollection` so you can persist your data.\nBut it is pretty annoying to always fetch the fitting collection via the `BrowserDbManager` Singleton.\nSo, if you are building your application with classes in TypeScript (or with babel and the decorators plugin)\nyou can also use decorators to retrieve `BrowserDb` and `BrowserDbCollection` instances!\n\nTo attach a `BrowserDb` instance to a class field just use the `BrowserDbProp` decorator:\n```typescript\nimport {BrowserDb, BrowserDbProp} from '@codelake/browserdb';\n\nclass SomeComponent {\n  @BrowserDbProp('foo')\n  private db: BrowserDb;\n}\n```\nIn the above example, the decorator will insert a `BrowserDb` instance\ninto the `db` property of a newly created `SomeComponent` instance.\nThat instance is internally fetched via the `BrowserDbManager`.\n\nBut in your case you may need the whole database but only one of its collections.\nThe steps necessary to do so are very similar to the ones to bind a database:\n```typescript\nimport {BrowserDbCollection, BrowserDbCollectionProp} from '@codelake/browserdb';\n\nclass SomeComponent {\n  @BrowserDbCollectionProp('foo', 'bar')\n  private collection: BrowserDbCollection;\n}\n```\nIn this example the first parameter of `BrowserDbCollectionProp` corresponds\nto the database name and the second parameter corresponds to the collection name.\n\n## Collection Usage\nbrowserdb aims work very much document like as a system like MongoDB does.\nSo, the first thing you need before you can work on any data is a database.\nIn this case you need an instance of `BrowserDb`.\n\n### Inserting data\nYou can insert any data you want into a collection like to following code shows:\n```typescript\ncollection.insertItem(4);\ncollection.insertItem('foo');\ncollection.insertItem({some: 'object'});\n```\n\n### Selecting data\nTo select data from a collection you have to provide a predicate, so the collection can determine what data should be returned.\n```typescript\ncollection.insertItem({ id: 1, name: 'foo' });\ncollection.insertItem({ id: 2, name: 'bar' });\n\nconst matches = collection.selectItems(x => x.id === 1);\nconst foo = matches[0];\nconsole.log(foo.name); // will print foo\n```\nThe `selectItems(predicate)` method will always return an array of items which match the predicate.\n\n### Deleting data\nDeleting data required a predicate just as the selection of data does.\n```typescript\ncollection.insertItem({ id: 1, name: 'foo' });\ncollection.insertItem({ id: 2, name: 'bar' });\n\nconst deletions = collection.deleteItems(x => x.id === 1);\n```\nThe `deleteItems(predicate)` method returns an array which contains all the items which have been removed from the collection.\n\n### Updating data\nTo update the data inside a collection you have to provide two callbacks: a `predicate` and an `updater`.\n```typescript\ncollection.insertItem({ id: 1, name: 'Hello' });\ncollection.insertItem({ id: 2, name: 'Word' });\n\nconst updated = collection.updateItems(x => x.id === 2, x => {\n  x.name = 'World';\n  return x;\n});\n```\nAs the code shows, the `updater` has to return the new/updated item.\n\nIf the updater returns `undefined` the updating mechanism will keep the original object with its updated property/properties.\nSo you can shorten the update call to\n```typescript\ncollection.updateItems(x => x.id === 2, x => { x.name = 'World'; });\n```\nBut remember to keep the curly braces around the assignment.\nIf you omit them, the returned value of the assignment (in the example the string `'World'`) will become the new/updated item!\n\n### Clearing a collection\nIn case you want to delete all the data contained in a collection you have two options:\n```typescript\ncollection.clear();\n// or\ncollection.deleteItems(() => true);\n```\nIf your only goal is to clear the collection, the `clear()` method is recommended, as it uses less memory.\nBut if you want to perform operations on the deleted items, you should use the second method, since it returns all the deleted items.\n\n__Note:__ Be careful which way of collection clearing you use if your application makes use of events\nas the `clear` and `deleteItems` methods trigger different events!\nSee [clear event](#clear-event).\n\n## Events\nIt might also be the case that you are interested in the changes that happen to the data of a `BrowserDbCollection`.\nHooking into such events is fairly easy.\nTo do so, you just have to add a listener (callback) to the event you are interested in.\n\n### insert event\nThis event is triggered after an item has been inserted into the collection.\nThe callback will receive the inserted item and the collection in which the item has been inserted.\n\n```typescript\ncollection.on('insert', (item: any, col: BrowserDbCollection) => {\n  // do stuff\n});\n```\n\n### update event\nThis event is triggered after items in the collection have been updated.\nThe callback will receive the array of updated items and the collection in which the items have been updated.\n\n__Note:__ This event is only triggered if an update took place -\nso, if an item in the collection matched the predicate.\n\n```typescript\ncollection.on('update', (items: any[], col: BrowserDbCollection) => {\n  // do stuff\n});\n```\n\n### delete event\nThis event is triggered after items in the collection have been deleted.\nThe callback will receive the array of deleted items and the collection from which the items have been deleted.\n\n__Note:__ This event is only triggered if a deletion took place -\nso, if an item in the collection matched the predicate.\n\n```typescript\ncollection.on('delete', (items: any[], col: BrowserDbCollection) => {\n  // do stuff\n});\n```\n\n### clear event\nThis event is triggered after The collection has been cleared.\nThe callback will receive the collection which has been cleared.\n\n__Note:__ This event will only be triggered if the `clear` method has been called.\nIf you delete all the items of a collection via a call of the `deleteItems` method\nwith a predicate which matches all items, it will trigger the `delete` event instead\nof the `clear` event.\n\n```typescript\ncollection.on('clear', (col: BrowserDbCollection) => {\n  // do stuff\n});\n```\n\n### remove listeners\nIt may also come in handy to remove listeners as soon as you are not interested in listening to a collection.\nTo remove a listener, you must provide the event it is listening to as well as the callback itself.\n\n```typescript\n\nconst cb = (_, col) => {\n  console.log(\"Something happened in [%s]\", col.getName());\n};\n\ncollection.on('insert', cb);\n\ncollection.removeListener('insert', cb);\n```\n\n## Some Q&A\n* When does the data of a collection get persisted?\n  * Every time you modify the collection via its CRUD methods (except for reading/selecting data) the collection will automatically be persisted as soon as the operation of the collection has finished\n* What happens if I modify a selected item without using the `updateItems` method?\n  * Nothing - more or less\n\n    If you modify items (in the sense of objects) outside the regular updating mechanism it will be updated in the internal data storage/cache of the collection, but the change will not be persisted.\n    So, if you want to make sure all your changed are persisted, use the regular updating mechanism.\n","readmeFilename":"README.md"}