{"bugs":{"url":"https://github.com/vuejs/vuefire/issues"},"dist":{"shasum":"1bda6ba22c4677b2b8f02a25c778cff3a7144c79","tarball":"https://registry.npmjs.org/@posva/vuefire-core/-/vuefire-core-2.0.0.tgz","fileCount":6,"integrity":"sha512-Lkb9gg7HGatrHP4QYEMGkxc58X1FGAALQKKD/JWZQZboKFNGB1WCGarvHpAVtZ0N2KAeT5xKLmuqIQ4E4gmMBw==","signatures":[{"sig":"MEYCIQC+fFRCdAE7xovtWdu/xx9mQVDV4jfzWiE2mjbIlnTJHwIhAJHx6G1bIV3cupoqBVvbigLhZ+45Qkunp/Vb5PNWXO9L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1VVxCRA9TVsSAnZWagAAETMQAINh93Y4B89AJltAZJg/\n2rVB5NUWI3ZAHgeVvZetiuy2pFsKShlRJwm1J1Yt9nqkPUsYGong9GgyWosr\nfntiK8ZMwgLOApoI2bsylXFsI/2Gkn59NKzKEYpLFtxM1HOk7/o9um6SN3HU\n3rcJVesarQMypvvGub6ZaSiCQWhtdwZeeuifs5zZo8pmLG7Fx0SeYbqPSqZG\nMr2ckf4FrprvIZSjCPI+KillCARrrIyQTR7wVBjUZMHIiFHMNjuVaFQQOIYG\ni1eqqrXL4iuPVRarpPjnTzZL+J/1CHiSHE/5AU79Pwc0xCRCACJUgV35S3j7\n4OeYxBK45dcqpOaeBqRmrDgSpJH0uFzNY5IY6e0qUHckMYoSxEHbjYTT7FKf\njYGF+v2ssJ6FFm6kYSbFLhsBUzzyg9SOXKXY9gRFTXkffSF2/6QKWCRzdbSP\nLSy6ZM6cDsAGlZW4BMJGYOp10q5K56LGhSRppCHb8WZpBSA+QwxK15Elz7O0\nZ+Lv9swXR+PHMus+mV/x44tIIK6UKgwZcE7LXHDzSszhyP9zYlw/Aj6xf9S4\nMGcwQ3ApHLLpAXJ8mtmHmujch6tmCQU4Sn3NjMv6JrBZiUSf60SQGVt+23Yq\nXVDpO0DE6UDeq+2ikwR23YLJo+6WVurARLWGaOV3eHtBztg5yXLAUtQkP+YW\nT70M\r\n=EAhP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"@posva/vuefire-core","author":{"name":"Eduardo San Martin Morote","email":"posva13@gmail.com"},"readme":"# Vuefire Core\n\n> Core logic used for vuefire and vuexfire\n\nThis library is intended for internal usage. You are free to use it to create your own plugins but keep in mind that the main target is a Vue plugin\n\n## Installation\n\n```sh\nnpm i @posva/vuefire-core\n```\n\n## Usage\n\n```js\nimport { bindCollection, bindDocument, walkSet } from '@posva/vuefire-core'\n\n// create an object of operations\nconst ops = {\n  set: (target, path, value) => walkSet(target, path, value),\n  add: (array, index, data) => array.splice(index, 0, data),\n  remove: (array, index) => array.splice(index, 1),\n}\nconst vm = new Vue({\n  // options\n})\n\nconst resolve = data => {\n  console.log('reference bound:', data)\n}\n\nconst reject = err => {\n  console.log('error binding reference:', err)\n}\n\n// unbind is a function that tears down all listeners\nconst unbindItems = bindCollection(\n  {\n    // vm could be just an object\n    vm,\n    // key set on vm\n    key: 'items',\n    ops,\n    collection: db.collection('items'),\n    // this is to enable Promise based APIs\n    // callback on success\n    resolve,\n    // callback on error\n    reject,\n  },\n  // default options\n  {\n    maxRefDepth: 2,\n  }\n)\n\nconst unbindItem = bindDocument(\n  {\n    // same options as bindCollection except for collection -> document\n    document: db.collection('items').doc('0'),\n  },\n  options\n)\n\nunbindItems()\nbindCollection({\n  // bind a different collection\n  key: 'items',\n})\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","gitHead":"694123cacbc447f1e7d62a07d284e019d38f76da","license":"MIT","scripts":{"dev":"yarn run test:unit -- --watchAll","lint":"eslint --fix src test","test":"yarn run test:unit","pretest":"yarn run lint","test:unit":"jest"},"_npmUser":{"name":"posva","email":"posva13@gmail.com"},"homepage":"https://github.com/vuejs/vuefire#readme","repository":{"url":"git+https://github.com/vuejs/vuefire.git","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.3+x64 (darwin)","description":"Shared code for vue + Firebase apps used by vuefire and vuexfire","directories":{"lib":"src","test":"test"},"maintainers":[{"name":"posva","email":"posva13@gmail.com"}],"_nodeVersion":"10.15.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^24.7.1","eslint":"^5.9.0","firebase":"^5.11.1","typescript":"^3.4.5","@babel/core":"^7.0.0-0","@types/jest":"^24.0.12","@babel/preset-env":"^7.4.4","eslint-plugin-vue-libs":"^3.0.0","@posva/vuefire-test-helpers":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/vuefire-core_2.0.0_1557484913110_0.2270414801470204","host":"s3://npm-registry-packages"},"_id":"@posva/vuefire-core@2.0.0","version":"2.0.0"}