{
	"name": "checkpoint-store",
	"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"
			},
			"maintainers": [
				{
					"name": "kumavis",
					"email": "aaron@kumavis.me"
				}
			],
			"directories": {},
			"contributors": []
		},
		"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"
			},
			"maintainers": [
				{
					"name": "kumavis",
					"email": "aaron@kumavis.me"
				}
			],
			"directories": {},
			"contributors": []
		}
	},
	"time": {
		"modified": "2015-10-06T19:42:14.076Z",
		"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"
	},
	"users": {},
	"dist-tags": {
		"latest": "1.1.0"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"09bc5ba8f7b3ea6c8da32e85c326c910\"",
			"fetched": 1602009447750
		}
	},
	"_distfiles": {
		"checkpoint-store-1.0.0.tgz": {
			"url": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.0.0.tgz",
			"sha": "2ef41e2d00dc7dee47d009d57fd7aae392db24b5",
			"registry": "npmjs"
		},
		"checkpoint-store-1.1.0.tgz": {
			"url": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz",
			"sha": "04e4cb516b91433893581e6d4601a78e9552ea06",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"checkpoint-store-1.1.0.tgz": {
			"shasum": "04e4cb516b91433893581e6d4601a78e9552ea06"
		}
	},
	"_rev": "22-c152e94a0b89fcab",
	"_id": "checkpoint-store",
	"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."
}