{"_id":"@cursorsdottsx/z","_rev":"3-cb81ed98cf40226edad62a033e5fc4bc","name":"@cursorsdottsx/z","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@cursorsdottsx/z","version":"1.0.0","description":"What? What's Zed? Ctrl Zed of course. Go Ctrl + Z your objects by employing a Version Control System for your JavaScript objects.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/z.git"},"keywords":[],"author":{"name":"im-lonely","email":"cursors.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/cursorsdottsx/z/issues"},"homepage":"https://github.com/cursorsdottsx/z#readme","gitHead":"0d4dfda8f5b8837fb5275abcf91700b328fe2de8","_id":"@cursorsdottsx/z@1.0.0","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-aAsJU9dGcHCjiga0j1v4JeqR3M+wLWCfy4KZpqSouQ78w9VXwrPVMFCFX6NZmeWVxBPrfUdY2475Ez4wAitVqw==","shasum":"f444c92d1fa187eaf9d4ba4b3e07c422127d483c","tarball":"https://registry.npmjs.org/@cursorsdottsx/z/-/z-1.0.0.tgz","fileCount":3,"unpackedSize":13080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpW/sCRA9TVsSAnZWagAAUi0P/26hGiasjEPht31AiSYT\nYt0z1H3TPUtD+lkSjRvevprXXjd2+QFG2K+6YxUAOIX+kJosgHyZ1tNFOH1m\nGLRyK/7n+gUNCt/U+jRtCYGA8dhEBxr2aMzBIqgF/ia0c35UbxR+Z6aiypiX\ntHNdZmtRn3LdFwxH60c2JLK7GXIz4mIQbJM9Pi5HfbidAYkvqlqan3LVQzOG\n22omy0KaV6gbnsUuSeZKf36WqZkX2EJKK2WjjtonN57BBW6hywwKRq1WXUUT\ndriJOEnFwyu9Ld1ZFWDUzmEPgYxuNFoo1wzteDt9+R99rAkEYGEBuk9Y+/hr\nBJEqvHdl4AhVk/WGqc93F5O7mUnQtlrZSI9M2mTRhdRzc8Lr2Q7rtXFGbKWm\nJ7iuUg39vwLOZKzBN1OUw2kq+BZ9kJpqU9ToETI4X0cz+jeTuEp9/v5sjxQF\ntfWANoesFT7+s4Baq6QuzuMpu7wjQiYiz8FC4L69ViZeDSpHSP54PITvq/q/\nfNjXtN4xLLOffRqldcmmhytboIotVRPzkKn2OB/uW/saIQ7CG9gy3SNxh800\nQEq7upFxJ4GgBLTXxTgdGpmiF1wIQtMabR3X0J1ysuo5o1o4yrY9lESaQq7u\n1TukeIxQ4FcsGiyrFx+grTBKERdVbyRjuLjbgKgCqgO0MAc2Itj+oMzyDZwI\ncQAV\r\n=TmI3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYOAYXCRMFduG/oxezm5NBXMY0vmx9Xw9cdJiVavSq6QIgAgXHIU4izkxMwJDb+ev07yYn0UZYchfRpJhzXtnfQJQ="}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/z_1.0.0_1621454828327_0.4758845739456885"},"_hasShrinkwrap":false},"1.0.1":{"name":"@cursorsdottsx/z","version":"1.0.1","description":"What? What's Zed? Ctrl Zed of course. Go Ctrl + Z your objects by employing a Version Control System for your JavaScript objects.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/z.git"},"keywords":[],"author":{"name":"im-lonely","email":"cursors.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/cursorsdottsx/z/issues"},"homepage":"https://github.com/cursorsdottsx/z#readme","gitHead":"0e6994fb0927f711bde7602edfd83a1f931110de","_id":"@cursorsdottsx/z@1.0.1","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-V+wEWOwwfgJixiBbatM2KaqSjdTpF1S6rzOeaGOVqyOZWZhPeFU6ZMT0Jb3fnAZ/bSneSw3oNANvHxQOtrVKng==","shasum":"389f9392e2990fcb7a4517a172bf1d486f8c9171","tarball":"https://registry.npmjs.org/@cursorsdottsx/z/-/z-1.0.1.tgz","fileCount":3,"unpackedSize":13080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpXBQCRA9TVsSAnZWagAAhl4QAIJ/GnWLobw6bq5ySp1d\n1+gJAmiygf34M9lCUbR48v4rsF8enuav7AgPIPN3sMDgCwuBJ1PRLUDfHkXw\nxfjgAPuA1kgIXkYeMSEZ4LzhhaiY+aZ/9R3BSSvTiU74IDl03AV+VI7biiZh\nCzotbjwlSvR5vPrrIhfzN1927AKJrSV3vVxtSWwVSr9dFSReetKHEyipkIAR\ng8Hgvmk/c7aN3lmYY1jnFArnkchbSy3oQSCstpPTipdNDeToIiV0ZTlfUc6z\nTnM5nERM1sRiZK7wRkOQmDaXk3sUVB9/6vzvOGHf8fyiOHmZzM1TD93g0duk\nGvk9/62R7hT0/GYnjrSHFEbtZL8gU3hblIQFdxV3uF9nHK3bc2G0NO/KjZ70\n3LYgY56CGdgY6S1v8O2Rp4+b6SkozsYRy41pmYf9F5scMT6Neshmw76XuUeK\nElH+l20W/Geokv+fFA6jfZw5hffjq/ce7GjSB2XY0ZxH4ebEwfzl76Z7jCOP\nDjQ4PnXf/zzdU80D6XIUGaGo4W3DYYOzBkFVGOr0+A2fdqPhN1SJgAGvObSJ\nNPKg8Xdk4SxOEZA9FAFCA9PYWpmJCFD4hyQTtnHWTMxnVQ2Euakouw7CS4mz\nHzkFwlAJ+sc4YmqNEV9K0QJ0GcFQqL3/WzPViWPNWFbZdKtCOTbXXpnk0PaB\nCrR4\r\n=QT6C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoQ4DchwNxmOukrWZQS/W7M1lpPenSozzJ6LH9HpSf/AIhANMruBdWAuX4mtebvdu/kK68bC05RNmUzvQ1D1J3Hd2w"}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/z_1.0.1_1621454927864_0.08883539241337668"},"_hasShrinkwrap":false},"2.0.0":{"name":"@cursorsdottsx/z","version":"2.0.0","description":"What? What's Zed? Ctrl Zed of course. Go Ctrl + Z your objects by employing a Version Control System for your JavaScript objects.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/z.git"},"keywords":[],"author":{"name":"im-lonely","email":"cursors.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/cursorsdottsx/z/issues"},"homepage":"https://github.com/cursorsdottsx/z#readme","gitHead":"4b06a078e1d0322710708b54fde18e121af587fe","_id":"@cursorsdottsx/z@2.0.0","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-J540/80f9PWDqUbAqMTxtW65++mN7oVm0S6uvf1eeglEaPCJ873Gkkg5QyVLcvBlaI0+km4dLDIi2FHoFViqig==","shasum":"e9b4e556aeee94b4b73fda62f4384c0f9e562d22","tarball":"https://registry.npmjs.org/@cursorsdottsx/z/-/z-2.0.0.tgz","fileCount":4,"unpackedSize":18394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqXGgCRA9TVsSAnZWagAAx94P/j8Qpvxiodg0BlPKktfr\n7adgLxvLiqP4A18bAslzIlrZIfZxRSrSUqRKZTmsmYWI8qw7naEkn03DY+FK\nuw10emOHWdM84stpWfEGe/WVtHzlmtyq3dXGB4gWZgPtegAWFWPEWHsq2T/L\na5wLefT+shWNc7BqzpastwezhwOp+ZQjbM2Y9d5lWnMPBkqokPgV9OYjQUDC\nXjpfosEBSdHYCz7Wl3QnlQb4Z85kMkmRfZ+dwLFAwOODifl0KkYn/+9jFVaT\npbvydtyIyNh8u834NyJLDJDFOJgwbWfNgoS2I9xXp5Z9hDSR4L79N8bhwt0n\noXg43bCQNtb9/CDkj2YAsIy1E8rDG89VS4GPjzQ8dAL/iMlDc5/itfglx9gt\n5V4gBeNguopcpmNMn5ia99lkwDubt7h/2/B3gDylssr5R3pNiF4xe5+pKvz3\nw3XADoVA+Bg1Ds5hbtiFBs4d3VFQ5UfpKm7mLHg60mcVrIkQno5kHW6J+u+T\nfYh70CCpwiTXPgKDrQ2ODwhDEV6ZO5BjMTbmzv+bsLPZgfV8xY4avI5vwnfS\n+5Qz8kkJxxfvD2UMRGHaEmeLOhLlr44X4uqS6s7O1QuxMNqCQvNw7ulDA+yn\nnHBDn5JwnJsIfg04NQABhUJs5h7E1t+afRnJrVc0CEcEE9Pw9KFBXkbEYzH6\nh12x\r\n=ervR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCl7Kdv11/rxNKtuhkFmKuIaHktCIKYw6VVWk8Zc8HgrQIhAJRegPyWNsLpr8PMMfgWCFJZNPS8AbULXmaJ8uJ4Exrr"}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/z_2.0.0_1621717408422_0.29554623510706257"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-19T20:07:07.951Z","1.0.0":"2021-05-19T20:07:08.463Z","modified":"2022-04-05T02:20:41.446Z","1.0.1":"2021-05-19T20:08:48.100Z","2.0.0":"2021-05-22T21:03:28.555Z"},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"description":"What? What's Zed? Ctrl Zed of course. Go Ctrl + Z your objects by employing a Version Control System for your JavaScript objects.","homepage":"https://github.com/cursorsdottsx/z#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/z.git"},"author":{"name":"im-lonely","email":"cursors.dev@gmail.com"},"bugs":{"url":"https://github.com/cursorsdottsx/z/issues"},"license":"MIT","readme":"| [a](https://www.npmjs.com/package/@cursorsdottsx/a)\n| [b](https://www.npmjs.com/package/@cursorsdottsx/b)\n| [c](https://www.npmjs.com/package/@cursorsdottsx/c)\n| [d](https://www.npmjs.com/package/@cursorsdottsx/d)\n| [e](https://www.npmjs.com/package/@cursorsdottsx/e)\n| [f](https://www.npmjs.com/package/@cursorsdottsx/f)\n| [g](https://www.npmjs.com/package/@cursorsdottsx/g)\n| [h](https://www.npmjs.com/package/@cursorsdottsx/h)\n| [i](https://www.npmjs.com/package/@cursorsdottsx/i)\n| [j](https://www.npmjs.com/package/@cursorsdottsx/j)\n| [k](https://www.npmjs.com/package/@cursorsdottsx/k)\n| [l](https://www.npmjs.com/package/@cursorsdottsx/l)\n| [m](https://www.npmjs.com/package/@cursorsdottsx/m)\n| [n](https://www.npmjs.com/package/@cursorsdottsx/n)\n| [o](https://www.npmjs.com/package/@cursorsdottsx/o)\n| [p](https://www.npmjs.com/package/@cursorsdottsx/p)\n| [q](https://www.npmjs.com/package/@cursorsdottsx/q)\n| [r](https://www.npmjs.com/package/@cursorsdottsx/r)\n| [s](https://www.npmjs.com/package/@cursorsdottsx/s)\n| [t](https://www.npmjs.com/package/@cursorsdottsx/t)\n| [u](https://www.npmjs.com/package/@cursorsdottsx/u)\n| [v](https://www.npmjs.com/package/@cursorsdottsx/v)\n| [w](https://www.npmjs.com/package/@cursorsdottsx/w)\n| [x](https://www.npmjs.com/package/@cursorsdottsx/x)\n| [y](https://www.npmjs.com/package/@cursorsdottsx/y)\n| **z**\n|\n\n**Z is for Zed**\n\n# @cursorsdottsx/z\n\nWhat? What's Zed? Ctrl Zed of course. Go Ctrl + Z your objects by employing a Version Control System for your JavaScript objects.\n\nZed is the most advanced object VCS because there are no other fucking objects VCS's on NPM. That's how useless it is!\n\nNevertheless this package has all you need to dictate your object's state through time.\n\n#### Easy to install\n\nZed can be installed with the typical NPM or Yarn:\n\n```bash\nnpm install @cursorsdottsx/z\n```\n\n```bash\nyarn add @cursorsdottsx/z\n```\n\n#### Easy to use\n\n```js\nconst Zed = require(\"@cursorsdottsx/z\").default;\n```\n\n```js\nimport Zed from \"@cursorsdottsx/z\";\n```\n\nYay you actually installed this! Time to use it! Zed is available as a global class:\n\n```js\nconst object = { foo: \"bar\" }; // hm a regular object is boring af\n\nconst zed = new Zed(object); // ah thats better\n\nconsole.log(zed.latest.foo); // => \"bar\"\n\nzed.latest.foo = \"baz\";\n\nzed.commit(\"Change to baz\");\n\nconsole.log(zed.latest.foo); // => \"baz\"\n\nzed.revert();\n\nconsole.log(zed.latest.foo); // => \"bar\"\n```\n\nZed also supports branching and reverting to a snapshot by id!\n\nIf you don't want the extra overhead of those things, you can alwayse use `Zed.Simple`:\n\n```js\nconst object = { foo: \"bar\" }; // hm a regular object is boring af\n\nconst zed = new Zed.Simple(object); // ah thats better\n\nconsole.log(zed.latest.foo); // => \"bar\"\n\nzed.latest.foo = \"baz\";\n\nzed.commit(\"Change to baz\");\n\nconsole.log(zed.latest.foo); // => \"baz\"\n\nzed.revert();\n\nconsole.log(zed.latest.foo); // => \"bar\"\n```\n\nIt acts the same as Zed without multiple histories, but there are some changes to `revert` as you will see in the docs.\n\nDon't want to use `zed.latest` all the time just to change the object? Well you can extend Zed or Zed.Simple!\n\nThat's right, Zed will behave differently when extended!\n\n```js\nclass VersionedObject extends Zed {\n    constructor() {\n        super(zedOptions);\n    }\n}\n\nconst object = new VersionedObject();\n\nobject.property = \"foo\";\n\nobject.commit(\"I like foos\");\n\nobject.property = \"bar\";\n\nobject.commit(\"bars are better\");\n\nobject.revert();\n\nobject.property; // => \"foo\"\n```\n\nThis is also inherently more type safe and goes well with TypeScript!\n\n### Some boring ass documentation\n\n### `new Zed(object, options)`\n\n-   `object` – The object to track.\n-   `options` – Options for Zed.\n    -   `master` – Name of the master branch.\n    -   `message` – Repo initialization message.\n\nCreates a new Zed instance.\n\n### `Zed.prototype.latest`\n\nThe current snapshot (badly named I know).\n\n### `Zed.prototype.commit(message)`\n\n-   `message` – Optional commit message.\n\nCommits the current Zed object to the timeline.\n\n### `Zed.prototype.revert(id)`\n\n-   `id` – Optional snapshot id to revert to.\n\nOh shit you messed up! Reverts the timeline to the last snapshot (or the snapshot with the id provided).\n\n### `Zed.prototype.branch(name, options)`\n\n-   `name` – Name of the new branch.\n-   `options` – Options for the new branch.\n    -   `m` – Overwrite the branch that already exists.\n    -   `b` – Checkout the new branch.\n\nCreates a new branch in the timeline.\n\n### `Zed.prototype.checkout(name)`\n\n-   `name` – Name of the branch.\n\nSwitches to another branch.\n\n---\n\n### `new Zed.Simple(object, options)`\n\n-   `object` – The object to track.\n-   `options` – Options for Zed.\n    -   `master` – Name of the master branch.\n    -   `message` – Repo initialization message.\n\nCreates a new Zed instance.\n\n### `Zed.Simple.prototype.latest`\n\nThe current snapshot (badly named I know).\n\n### `Zed.Simple.prototype.commit(message)`\n\n-   `message` – Optional commit message.\n\nCommits the current Zed object to the timeline.\n\n### `Zed.Simple.prototype.revert(times, force)`\n\n-   `times` – How many times do we wanna roll' back?\n-   `force` – Force rollback to earliest change if needed.\n\nOh shit you messed up! Reverts the timeline to the last snapshot.\n\n[npm abc's homepage](https://codepen.io/cursorsdottsx/full/KKWNRaY)\n","readmeFilename":"README.md"}