{"_id":"checkpoint-store","_rev":"4-c39de79155c67bac275bafb8b26aba04","name":"checkpoint-store","description":"In-memory key-value store with history! Keys are strings, values are any type.","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"checkpoint-store","version":"1.0.0","description":"In-memory key-value store with history! Keys are strings, values are any type.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"kumavis"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/kumavis/checkpoint-store.git"},"dependencies":{"functional-red-black-tree":"^1.0.1"},"gitHead":"a4341929b2e713ca819bc52dcda927087bdadc30","bugs":{"url":"https://github.com/kumavis/checkpoint-store/issues"},"homepage":"https://github.com/kumavis/checkpoint-store#readme","_id":"checkpoint-store@1.0.0","_shasum":"2ef41e2d00dc7dee47d009d57fd7aae392db24b5","_from":".","_npmVersion":"3.3.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"2ef41e2d00dc7dee47d009d57fd7aae392db24b5","tarball":"https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.0.0.tgz","integrity":"sha512-DiM8zCDjUjyN1oa7RqI5vuhH4rUL8Nt4p04MQB2OcLMtcZ12hvWHhFkV3phMrrrpvj24z+3G1nd2a1QqL/kvrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEA5RV2/t6dbZcrMApfBk9TL2Pxt3wb1yEnmXxlGy6PAiBc7ajlMEP/DlbBfHe8WkkGjECZjfPoDv1KCMkPXiuMng=="}]},"maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}]},"1.1.0":{"name":"checkpoint-store","version":"1.1.0","description":"In-memory key-value store with history! Keys are strings, values are any type.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"kumavis"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/kumavis/checkpoint-store.git"},"dependencies":{"functional-red-black-tree":"^1.0.1"},"gitHead":"193f1186746d1b02d65dca66f57805f81db54fe3","bugs":{"url":"https://github.com/kumavis/checkpoint-store/issues"},"homepage":"https://github.com/kumavis/checkpoint-store#readme","_id":"checkpoint-store@1.1.0","_shasum":"04e4cb516b91433893581e6d4601a78e9552ea06","_from":".","_npmVersion":"3.3.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"04e4cb516b91433893581e6d4601a78e9552ea06","tarball":"https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz","integrity":"sha512-J/NdY2WvIx654cc6LWSq/IYFFCUf75fFTgwzFnmbqyORH4MwgiQCgswLLKBGzmsyTI5V7i5bp/So6sMbDWhedg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxOP2lzeksmvPmUYOIMkFPHOqDbfasn3fXbrr/0S+8+AiAW5nFN1HUY6tgz3Tjir8CtRMa4US14BjlDpFs4/BAx0g=="}]},"maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}]}},"readme":"# Checkpoint-Store\n\nIn-memory key-value store with history!\nKeys are strings, values are any type.\n\n```js\nvar store = new CheckpointStore()\nstore.put('xyz', 'hello world')\nstore.checkpoint()\nstore.put('xyz', 'haay wuurl')\n\nstore.get('xyz') //=> 'haay wuurl'\nstore.revert()\nstore.get('xyz') //=> 'hello world'\n```\n\nUses [functional-red-black-tree](https://github.com/mikolalysenko/functional-red-black-tree) under the hood.\n\n### api\n\n##### new CheckpointStore(initialState)\n\ncreates a new store. optionally pass in the intial state as a pojo.\n\n##### store.put(key, value)\n\nsets a value. key is a string. value is any type.\n\n##### store.get(key)\n\nreturns a value. key is a string. value is any type.\n\n##### store.del(key)\n\ndeletes a value. key is a string.\n\n##### store.checkpoint()\n\nadds a checkpoint. state of the store can be returned to this point.\n\n##### store.revert()\n\nreturns to the state of the previous checkpoint. throws an error if there are no checkpoints.\n\n##### store.commit()\n\nkeeps the state and removes the previous checkpoint. throws an error if there are no checkpoints.\n\n##### store.isCheckpointed()\n\nreturns true if the store has remaining checkpoints.\n\n##### store.copy()\n\nreturns a new CheckpointStore with matching state and checkpoints.\n\n##### store.toJSON()\n\nreturns an object (not a string!) of the current state.","maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}],"time":{"modified":"2022-06-13T05:56:17.593Z","created":"2015-10-06T19:08:06.508Z","1.0.0":"2015-10-06T19:08:06.508Z","1.1.0":"2015-10-06T19:42:14.076Z"},"homepage":"https://github.com/kumavis/checkpoint-store#readme","repository":{"type":"git","url":"git+https://github.com/kumavis/checkpoint-store.git"},"author":{"name":"kumavis"},"bugs":{"url":"https://github.com/kumavis/checkpoint-store/issues"},"license":"ISC","readmeFilename":"README.md"}