{"bugs":{"url":"https://github.com/ionic-team/ionic-storage/issues"},"dist":{"shasum":"ae8d8c0504da53ea82d7fb591e119a73b5180c49","tarball":"https://registry.npmjs.org/@ionic/storage/-/storage-2.3.1-beta.1.tgz","fileCount":22,"integrity":"sha512-9butxyhShnWp5yjXMfxL1eDImkLL7bKGjNTzRqGvAZ5oFUdUp4LMIhQYyxBxOZbhY65ggx1AlPfo2pQfpw7XLg==","signatures":[{"sig":"MEQCIEAS8aUueJHR0MaysjIOYbfnzbLIR11E9Cv24+6ILEYjAiBbUUCgc+CwO6q8sW05KG2kzJVJsxWx5rFtbJ3e/+pNCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":203059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqSICRA9TVsSAnZWagAAPooP/00vtrR5cSTA2mTHsvXf\nQOh2yEfL1T4NsKC5ui9CmOoTC/JCbt6jrzqayiAYsH4VcVdln/j3CcxR/oqR\nrxq6wnJPuE6x/Of9t21eh6Sjs+cBU49YPUj6+6Hdp990CNhh9FBppzkdGeP5\nml8Hc8GKKrA9U0Q671tmPAiNwpOGzmplyOpoO7sujS90hKhJh92SIrync+vN\n1J/YoV9T4tmOYR7kQt/C+fubOEgQfLJ+lT04YJPFwfZ1OPUUDrkmK2i7MLJa\n8zO3QHrN9XcrhlMf/9v52KVnLTsPwTNulTzpy88lnGD4MvxpRa1rR5FUg4IW\n54PKXQgopLlKDHhHxQIxCcfNZj3NVdgYiTf7L7nl2pfOnaG06Rcv0FektZeo\nwYU5u3qmxGfJWc2x7vbKWgm5pJPoq+OEI/EMfLJFPRsUapI1r5+mKi/D7dNi\nl9vAGMchVIT1QR6E064txSeu13n/OymBvjkBIpbzSB+IjUftMoCrci2dM2Ly\nIzgyxkapNpqmBeJZz+cxc3V05+swvqv3fINVB3vZ82baY88aKTWz6KM8swqq\n5u/5y5/IKoJA+9biS02x3228blUDd1JpiI9UDppjz+kkY69j81v3gVLgOcSQ\nvzSmjKG/vyeBmp4B7EWvt5tKGuWc83LuzyeYub+lMoGUQQc3Y/XFx9RbmsRB\nDUWD\r\n=xBgz\r\n-----END PGP SIGNATURE-----\r\n"},"esm5":"esm5/ionic-storage.js","main":"bundles/ionic-storage.umd.js","name":"@ionic/storage","fesm5":"fesm5/ionic-storage.js","es2015":"fesm2015/ionic-storage.js","module":"fesm5/ionic-storage.js","readme":"[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fionic-team%2Fionic-storage%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/ionic-team/ionic-storage/goto?ref=main)\n\n# Ionic Storage\nA simple key-value Storage module for Ionic apps based on LocalForage, with out-of-the-box support for SQLite. This utility makes it easy to use the best storage engine available without having to interact with it directly. Currently the ordering is SQLite, IndexedDB, WebSQL, and LocalStorage.\n\nOne reason we prioritize SQLite is because of some OS-dependent issues with storage in the browser in native apps. As a major example, iOS will currently clear out Local Storage (and IndexedDB it's been shown) when the device runs low on memory. To avoid that, a file-based storage approach with SQLite will retain all your data.\n\nIf you want to perform arbitrary SQL queries and have one of the best storage options around, we recommend using the [Ionic Native SQLite plugin](https://ionicframework.com/docs/v2/native/sqlite/) directly. This engine no longer supports the `query` feature underneath as it was not portable and only worked for SQLite anyways.\n\nFor those coming from Ionic pre RC.0, here is more insight in to the reason for us moving to this module: https://github.com/ionic-team/ionic/issues/8269#issuecomment-250590367\n\n### Installation\n\nTo use this in your Ionic /Angular apps, either start a fresh Ionic project which has it installed by default, or run:\n\n```bash\nnpm install @ionic/storage\n```\n\nIf you'd like to use SQLite as a storage engine, install a SQLite plugin (only works while running in a simulator or on device):\n\n```bash\ncordova plugin add cordova-sqlite-storage --save\n```\n\n### Usage\n\n\n\nThen edit your NgModule declaration in `src/app/app.module.ts` to add `IonicStorageModule` as an import:\n\n```typescript\nimport { IonicStorageModule } from '@ionic/storage';\n\n@NgModule({\n  declarations: [\n    ...\n  ],\n  imports: [\n    IonicModule.forRoot(MyApp),\n    IonicStorageModule.forRoot()\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    ...\n  ],\n  providers: [\n    ...\n  ]\n})\nexport class AppModule { }\n```\n\nNow, you can easily inject `Storage` into a component:\n\n```typescript\nimport { Component } from '@angular/core';\nimport { Storage } from '@ionic/storage';\n\n@Component({\n  selector: 'page-home',\n  templateUrl: 'home.html'\n})\nexport class HomePage {\n\n  constructor(private storage: Storage) {\n  }\n\n}\n```\n\nTo make sure the storage system is ready before using, call `Storage.ready()`. You must be\non 1.1.7 or greater to use the `ready()` method.\n\n```javascript\nstorage.ready().then(() => {\n});\n```\n\nTo set an item, use `Storage.set(key, value)`:\n\n```javascript\nthis.storage.set('name', 'Mr. Ionitron');\n```\n\nTo get the item back, use `Storage.get(name).then((value) => {})` since `get()` returns a Promise:\n\n```javascript\nthis.storage.get('name').then((name) => {\n  console.log('Me: Hey, ' + name + '! You have a very nice name.');\n  console.log('You: Thanks! I got it for my birthday.');\n});\n```\n\nTo remove the item, use `Storage.remove(key).then(() => { })`\n\n### Configuring Storage (new in 1.1.7)\n\nThe Storage engine can be configured both with specific storage engine priorities, or custom configuration\noptions to pass to localForage. See the localForage config docs for possible options: https://github.com/localForage/localForage#configuration\n\n\n```typescript\nimport { Storage } from '@ionic/storage';\n\n\n@NgModule({\n declarations: ...,\n imports: [\n   IonicStorageModule.forRoot({\n     name: '__mydb',\n     driverOrder: ['indexeddb', 'sqlite', 'websql']\n   })\n ],\n bootstrap: ...,\n entryComponents: ...,\n})\nexport class AppModule { }\n```\n\n\n### Development and release\n\nWhen you're ready to release a new version, run the following commands:\n\n1.  npm version (patch|minor|major)\n2.  npm run build\n3.  commit and push: `git push origin master --tags`\n4.  cd dist\n5.  npm publish\n","$schema":"./node_modules/ng-packagr/package.schema.json","esm2015":"esm2015/ionic-storage.js","license":"MIT","typings":"ionic-storage.d.ts","_npmUser":{"name":"mhartington","email":"mikehartington@gmail.com"},"fesm2015":"fesm2015/ionic-storage.js","homepage":"https://github.com/ionic-team/ionic-storage#readme","keywords":["ionic","angular","localforage","cordova","hybrid"],"metadata":"ionic-storage.metadata.json","repository":{"url":"git+https://github.com/ionic-team/ionic-storage.git","type":"git"},"_npmVersion":"6.14.8","description":"Ionic Storage utility","directories":{},"maintainers":[{"name":"adamdbradley","email":"hi+adam@ionicframework.com"},{"name":"brandyscarney","email":"brandy@ionic.io"},{"name":"cmapoole","email":"carl@ionic.io"},{"name":"dallasjames","email":"dallastjames@gmail.com"},{"name":"drifty","email":"max@drifty.com"},{"name":"dwieeb","email":"dwieeb@gmail.com"},{"name":"elylucas","email":"ely@meta-tek.net"},{"name":"giodimiliaionic","email":"giovanni@ionic.io"},{"name":"ikeith","email":"ian@ionic.io"},{"name":"ionicjs","email":"hi@ionicframework.com"},{"name":"jcesarmobile","email":"jcesarmobile@gmail.com"},{"name":"jthoms1","email":"jthoms1@gmail.com"},{"name":"kensodemann","email":"ken.sodemann@gmail.com"},{"name":"larsmikkelsen","email":"lars@ionic.io"},{"name":"liamdebeasi","email":"liam@debeasi.com"},{"name":"lukaswm","email":"luke@ionic.io"},{"name":"manucorporat","email":"manu.mtza@gmail.com"},{"name":"maxlynch","email":"max@ionic.io"},{"name":"mhartington","email":"mikehartington@gmail.com"},{"name":"mkremer90","email":"matt@ionic.io"},{"name":"nhyatt","email":"nick@ionic.io"},{"name":"perrygovier","email":"perry@ionic.io"},{"name":"tlancina","email":"tim@ionic.io"}],"sideEffects":false,"_nodeVersion":"12.16.1","dependencies":{"tslib":"^1.10.0","localforage":"1.7.1","localforage-cordovasqlitedriver":"1.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"rxjs":"*","@angular/core":"*"},"_npmOperationalInternal":{"tmp":"tmp/storage_2.3.1-beta.1_1598989447286_0.8392622656496724","host":"s3://npm-registry-packages"},"_id":"@ionic/storage@2.3.1-beta.1","version":"2.3.1-beta.1"}