{"_id":"@arfedulov/vue-form-persist","_rev":"1-b68c9b5e400a1485a1f4f015825715c3","name":"@arfedulov/vue-form-persist","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@arfedulov/vue-form-persist","version":"0.1.0","private":false,"main":"dist/vueFormPersist.common.js","description":"A library which helps you creating persistent vue forms","keywords":["vue","persist","form"],"author":{"name":"Artem Fedulov","email":"arfedulov@gmail.com"},"homepage":"https://github.com/arfedulov/vue-form-persist#readme","bugs":{"url":"https://github.com/arfedulov/vue-form-persist/issues"},"repository":{"type":"git","url":"git+https://github.com/arfedulov/vue-form-persist.git"},"license":"MIT","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build --target lib --name vueFormPersist ./src/lib/index.js","build:demo":"vue-cli-service build","test":"vue-cli-service test:unit","lint":"vue-cli-service lint"},"dependencies":{"core-js":"^3.6.5","lodash.debounce":"^4.0.8","vue":"^2.6.11"},"devDependencies":{"@vue/cli-plugin-babel":"~4.5.0","@vue/cli-plugin-eslint":"~4.5.0","@vue/cli-plugin-unit-jest":"~4.5.0","@vue/cli-service":"~4.5.0","@vue/eslint-config-prettier":"^6.0.0","@vue/test-utils":"^1.0.3","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-prettier":"^3.1.3","eslint-plugin-vue":"^6.2.2","prettier":"^1.19.1","vue-template-compiler":"^2.6.11"},"eslintConfig":{"root":true,"env":{"node":true},"extends":["plugin:vue/essential","eslint:recommended","@vue/prettier"],"parserOptions":{"parser":"babel-eslint"},"rules":{},"overrides":[{"files":["**/__tests__/*.{j,t}s?(x)","**/tests/**/*.spec.{j,t}s?(x)"],"env":{"jest":true}}]},"browserslist":["> 1%","last 2 versions","not dead"],"gitHead":"6c2953350c43d8b630215dc746bbc24593c7abb5","_id":"@arfedulov/vue-form-persist@0.1.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-JxDkkZp0btlvHK3RARKP1w7zN5Kr/dQb0IroTPPjlZVpmt3VvtS7lTHfkhv/GNFuojONC3kg66i6ciAcGdSZUg==","shasum":"94bc13938af808eedb7741b3ab8974a60c9ce0f3","tarball":"https://registry.npmjs.org/@arfedulov/vue-form-persist/-/vue-form-persist-0.1.0.tgz","fileCount":14,"unpackedSize":270388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVbugCRA9TVsSAnZWagAAlx0P/3rPWT4S4S4w3hNsN/Ap\nQtDsC2AqvXeHudoOtoYr7fY4+lzLyuv/LdFq6Ogbp/xgfIHx9ckhVgxeBFJS\nrWJsjQcfR2UAoKvNk2/MbvnOEFNvxHQeKa/ogQts4TCJ9y3BD4Sm61WQEoL9\nNUSfPGjELaMHY3MmC1eE0dYR9+XjHmjcYxmzIee/rEFXK4OdsM/vNyK2O5p3\nS9BGQLV5aD14iFm/CyGqTP353XJjJ1Lp019Z+YgjO9vFzYwPsxzhuvJ6HaZ3\nujXd5CI3/4zU5TzYJFDleM6fxVZSqiGBziGnaCOEVIhXChyVJmcAaM5J1rIM\nLMYy3RLEx1LCMI4i6VUjoh8qt6vXuTXJUkA7BP30MI73adVV9yshCs8gb8n/\n1yCEOofTCHbej977g+8oyz7BvrHAc7kW5yNJqFCuzqrqWNvZyWwA4BXY0blv\nVCtPz4ApqCdFdlt+lMBAmKX0gf0hpDxGq3P6tQpwwhSFwu55J+RbSZdPtBxS\n3aX6noj2ZXt3LsLvMJ3UOiLVCysuR6YfV2+ghmIB80p09CXbaoh8IQcJof2X\np97I5V+CyVaIj7S63lru0FFz2QU7V47vuRkRns4Z1m0C/5EqAvFoejAuBkZH\nc2dPrLVOwWc1FuUBfFZ+8KA9z8njjnHqKAf3XezN20PtPDnb+UYsDqNLhp0G\nsL7J\r\n=DJTy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNgp4tUG/7KOzkY32KUNhhJUUhY4RhXxVZvZ31aYQuyQIhAOkEapTkCQVyvm+dqD5D15bkLLomWAiksFwkdJCapjIq"}]},"_npmUser":{"name":"arfedulov","email":"arfedulov@gmail.com"},"directories":{},"maintainers":[{"name":"arfedulov","email":"arfedulov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-form-persist_0.1.0_1616231328299_0.13499858765334438"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-20T09:08:48.236Z","0.1.0":"2021-03-20T09:08:48.454Z","modified":"2022-04-04T15:24:10.218Z"},"maintainers":[{"name":"arfedulov","email":"arfedulov@gmail.com"}],"description":"A library which helps you creating persistent vue forms","homepage":"https://github.com/arfedulov/vue-form-persist#readme","keywords":["vue","persist","form"],"repository":{"type":"git","url":"git+https://github.com/arfedulov/vue-form-persist.git"},"author":{"name":"Artem Fedulov","email":"arfedulov@gmail.com"},"bugs":{"url":"https://github.com/arfedulov/vue-form-persist/issues"},"license":"MIT","readme":"# vue-form-persist\n\nThis package provides a mixin which adds persist functionality to\nvue forms. The mixin exposes `persist()` method which you can call\nin order to persist the component's data. The method is 1 second debounced\nby default.\n\n[live demo](https://arfedulov.github.io/vue-form-persist/)\n\nAn example of basic usage:\n\n```html\n<input v-model=\"username\" type=\"text\" name=\"username\" @input=\"persist\" />\n```\n\n```js\nimport { persistorMixin } from \"@arfedulov/vue-form-persist\";\n\nexport default {\n  name: \"DemoForm\",\n  mixins: [persistorMixin([\"username\"])], // specify field names that going to be persisted\n  data() {\n    return {\n      username: \"\", // is persisted\n      someOtherField: \"\" // is not persisted\n    };\n  }\n};\n```\n\nThere are three possibilities of how to provide a persistence key:\n\n* provide an attribute `persist-id`\n* provide a `persistKey` option to persistorMixin\n* rely on default behaviour (component's `name` is used as a persistence key)\n\nThe key is chosen in the following priority: attribute, option, default.\n\nAn example of using more than one instances of the same component\nusing `persist-id` attribute:\n\n```html\n<demo-form persist-id=\"form1\" />\n<demo-form persist-id=\"form2\" />\n```\n\nAn example of using `persistorMixin` with options:\n\n```js\nexport default {\n    // ...\n    mixins: [\n        persistorMixin([\"username\", \"email\", \"address\"], {\n            persistKey: \"my-persist-id\",\n            debounceTime: 500 // ms\n        })\n    ],\n    // ...\n}\n```","readmeFilename":"README.md"}