{"_id":"@divyankd/vuex-undo-redo","_rev":"1-842d0882ede01f402aaec28bce32eee3","name":"@divyankd/vuex-undo-redo","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.4":{"_from":"vuex-undo-redo@^1.1.4","_inBundle":false,"_integrity":"sha512-IfuizJGwCxOa9ZDmLRuWafLBnUYXFhDbbO676oemyz9Kw3ncjo/QNH6SfEEZVOJOrZS9vdiEs5c47qBXPKrWTQ==","_location":"/vuex-undo-redo","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"vuex-undo-redo@^1.1.4","name":"vuex-undo-redo","escapedName":"vuex-undo-redo","rawSpec":"^1.1.4","saveSpec":null,"fetchSpec":"^1.1.4"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/vuex-undo-redo/-/vuex-undo-redo-1.1.4.tgz","_shasum":"daf9b3192b68e1715386d77ad1d607c36522a849","_spec":"vuex-undo-redo@^1.1.4","_where":"/Users/divyank/Documents/Career/Jobs/SIDESTREAM/SidestreamCodingChalleng/push-pop-challenge/frontend","author":{"name":"Anthony Gore"},"bugs":{"url":"https://github.com/anthonygore/vuex-undo-redo/issues"},"dependencies":{},"deprecated":false,"description":"An extension to the work of vuex-undo-redo.","devDependencies":{"@vue/test-utils":"^1.0.0-beta.25","babel-core":"^6.10.4","babel-jest":"^23.6.0","babel-loader":"^7.1.2","babel-plugin-transform-runtime":"^6.9.0","babel-preset-env":"^1.6.1","babel-runtime":"^6.9.2","jest":"^23.6.0","rimraf":"^2.6.1","vue":"^2.5.17","vue-jest":"^3.0.0","vue-template-compiler":"^2.5.17","vuex":"^3.0.1","webpack":"^3.8.1","webpack-merge":"^4.1.0"},"homepage":"https://github.com/anthonygore/vuex-undo-redo#readme","jest":{"moduleFileExtensions":["js","json","vue"],"transform":{".*\\.(vue)$":"vue-jest","^.+\\.js$":"<rootDir>/node_modules/babel-jest"}},"license":"MIT","main":"src/plugin.js","name":"@divyankd/vuex-undo-redo","repository":{"type":"git","url":"git+https://github.com/anthonygore/vuex-undo-redo.git"},"scripts":{"build":"rimraf ./dist && webpack --config ./webpack.config.js","test":"jest"},"version":"1.1.4","_id":"@divyankd/vuex-undo-redo@1.1.4","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-L+gMqKNqnApxIZNBSttUqvIX6PTpeGhABsREZcjA9iofDGYtMuGV9X8zKRiIm+8LIjdY9bjsOLND7gkEpMek8Q==","shasum":"9e2aba97e23c4b22a4144f6b71b330c4f711ffea","tarball":"https://registry.npmjs.org/@divyankd/vuex-undo-redo/-/vuex-undo-redo-1.1.4.tgz","fileCount":7,"unpackedSize":26162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga6dRCRA9TVsSAnZWagAAoHQP/j1hWc7NBbEiwhS2udkS\nj3NCLUOFIbfu/IG78orekvIR+OSjbSpns1hjgsh064QWhOcltc2yVc0IK78C\nIH/H88wlYd+nFLoHyFRHVi43A/ovNlxmpXrDbLwMAnS8Cw1UVKWvwCE0nNtI\nH4vpLUumoRYqDT5uSIe8XlVavuAuTLJLiSVbX1vKzmc1Qd+UJLfRkUUyhGaH\n0e+D2DCOZQFoTvhrp1sXlnLrUfBO5gu1HJkkpT/mpqjqpnOI3P03vrQJeU0b\nSMuAqAfJl0V1nbH4HJ0DDNP5PsUYJb8KKdy0BhxHS8ZQHfgpBW+hsgdoE4xg\nS9qQgm6pbtNQ8q1S4h3dSFBOtMuDQIaoy7Wyd8uZar7UOuBvLfI86rR458I3\nmGAy4fZUqZo4bjra325Jf1GUds1nal67K99XdbF+3Ba/3R2LmSchXUI6vhcC\nwn8n80Qxs+guXzjpgfbRfEnLmEfYTdHxuFKKtVmgV21+JmvuUrJLLWi8deyt\n/DNFrlU+J0VTt45BiO5SnVrbmQ+FDius1cfwoZUO8yDHUKdwP04m2B0EP3cT\nEoVrtx4eiVVcOtr5T88HVM2cQDJBoUHLaKSv05Cc7s7dWPbjf8ENB9PnFNmh\nwHpgx0vS3kKZxlQknrcxbGJZMPJQvTDreNCnHzWlGRCn8foLSEr5aMoDM3YB\npi0C\r\n=wQzA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTPzJRk5tnjR/ySIdqSoz4qo0GtV4BCTuMeGN4LAFstAIgJM9lAkKDT5RBhi/Ftdfo2YzzHEjKU71sEbJLpBHK/JE="}]},"_npmUser":{"name":"divyankd","email":"divyank004@gmail.com"},"directories":{},"maintainers":[{"name":"divyankd","email":"divyank004@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuex-undo-redo_1.1.4_1617667920949_0.8006843651677436"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-06T00:12:00.905Z","1.1.4":"2021-04-06T00:12:01.113Z","modified":"2022-04-05T04:48:53.759Z"},"maintainers":[{"name":"divyankd","email":"divyank004@gmail.com"}],"description":"An extension to the work of vuex-undo-redo.","homepage":"https://github.com/anthonygore/vuex-undo-redo#readme","repository":{"type":"git","url":"git+https://github.com/anthonygore/vuex-undo-redo.git"},"author":{"name":"Anthony Gore"},"bugs":{"url":"https://github.com/anthonygore/vuex-undo-redo/issues"},"license":"MIT","readme":"# vuex-undo-redo\n\nA Vue.js plugin that allows you to undo or redo a mutation.\n\n> The building of this plugin is documented in the article *[Create A Vuex Undo/Redo For VueJS](https://vuejsdevelopers.com/2017/11/13/vue-js-vuex-undo-redo/)*\n\n## Live demos\n\n[![Edit Vuex Undo/Redo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vjo3xlpyny)\n\nThere's also a demo in [this Codepen](https://codepen.io/anthonygore/pen/NwGmqJ). The source code for the demo is [here](https://github.com/anthonygore/vuex-undo-redo-example).\n\n## Installation\n\n```js\nnpm i --save-dev vuex-undo-redo\n```\n\n### Browser\n\n```html\n<script type=\"text/javascript\" src=\"node_modules/vuex-undo-redo/dist/vuex-undo-redo.min.js\"></script>\n```\n\n### Module\n\n```js\nimport VuexUndoRedo from 'vuex-undo-redo';\n```\n\n## Usage\n\nSince it's a plugin, use it like:\n\n```js\nVue.use(VuexUndoRedo);\n```\n\nYou must, of course, have the Vuex plugin installed as well, and it must be intalled before this plugin. You must also create a Vuex store which must implement a mutation `emptyState` which should revert the store back to the initial state e.g.:\n\n```js\nnew Vuex.Store({\n  state: {\n    myVal: null\n  },\n  mutations: {\n    emptyState() {\n      this.replaceState({ myval: null });       \n    }\n  }\n});\n```\n\n### Ignoring mutations\n\nOccasionally, you may want to perform mutations without including them in the undo history (say you are working on an image editor and the user toggles grid visibility - you probably do not want this in undo history). The plugin has an `ignoredMutations` setting to leave these mutations out of the history:\n\n```js\nVue.use(VuexUndoRedo, { ignoreMutations: [ 'toggleGrid' ]});\n```\n\nIt's worth noting that this only means the mutations will not be recorded in the undo history. You must still manually manage your state object in the `emptyState` mutation:\n\n```js\nemptyState(state) {\n  this.replaceState({ myval: null, showGrid: state.showGrid });       \n}\n```\n\n## API\n\n### Options\n\n`ignoredMutations` an array of mutations that the plugin will ignore\n\n### Computed properties\n\n`canUndo` a boolean which tells you if the state is undo-able\n\n`canRedo` a boolean which tells you if the state is redo-able\n\n### Methods\n\n`undo` undoes the last mutation\n\n`redo` redoes the last mutation\n","readmeFilename":"README.md"}