{"_id":"history-tree","_rev":"5-738eb9fb9122dd3ca70639b817b0cb6f","name":"history-tree","description":"Tree for tracking reverts and commits on checkpoints. Checkpoints can nest arbitrarily deep.","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"history-tree","version":"1.0.0","description":"Tree for tracking reverts and commits on checkpoints. Checkpoints can nest arbitrarily deep.","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","dependencies":{"async":"^1.4.2","async-eventemitter":"^0.2.2"},"devDependencies":{"tape":"^4.2.0"},"gitHead":"013c8265c5a841e87aa967ed9b61c9a5d093b0e0","_id":"history-tree@1.0.0","_shasum":"7027dcdf2547835230a159d5fd3978e298c7cf59","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"7027dcdf2547835230a159d5fd3978e298c7cf59","tarball":"https://registry.npmjs.org/history-tree/-/history-tree-1.0.0.tgz","integrity":"sha512-nfai4aXLbDQKAhA7PPlw1Gvst8Ub9ByLY2JaAVT07ytc6MWNC2t3dKW2ZRc6MyBfwprKydGRBfA+U5ck0wCSJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFoCHsUBnjDnXbWiP4rlLl6o1TxjZMSO6UyGFlbWEyaYAiBhKtWCVPwnbqgPZhtZajNHkCU7nkLibFc74KMpzL+O8w=="}]},"maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}]},"1.0.1":{"name":"history-tree","version":"1.0.1","description":"Tree for tracking reverts and commits on checkpoints. Checkpoints can nest arbitrarily deep.","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","dependencies":{"async":"^1.4.2","async-eventemitter":"^0.2.2"},"devDependencies":{"tape":"^4.2.0"},"gitHead":"4d32bc4e6208d42b6d3d204a072e09784462d818","_id":"history-tree@1.0.1","_shasum":"afe20a4c24d9715a59f318e77819b7931acfaa1f","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"afe20a4c24d9715a59f318e77819b7931acfaa1f","tarball":"https://registry.npmjs.org/history-tree/-/history-tree-1.0.1.tgz","integrity":"sha512-SDpVeqwoeFoZV5Zet6zmPGfvVIIP09SpFv0m1C3mn1hdBUvoc4ICJ4bS545VSudDPI9YaHvYbxUhtDg1Lp3HIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJU1s9FFv85yynpsJxts3cqMDxL7z3Yz67wyYn/p05EAiBT0F4lYbaI1MtQgwb0Qrz+kSYuxgqMAwWLYq5a6j8lpw=="}]},"maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}]},"2.0.0":{"name":"history-tree","version":"2.0.0","description":"Tree for tracking reverts and commits on checkpoints. Checkpoints can nest arbitrarily deep.","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","dependencies":{"async":"^1.4.2","async-eventemitter":"^0.2.2"},"devDependencies":{"tape":"^4.2.0"},"gitHead":"0f1329c79839f144f327a04fa10aed4a7ed1124c","_id":"history-tree@2.0.0","_shasum":"ebc714dcf11515e6bef13488c28346231cd76f42","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"ebc714dcf11515e6bef13488c28346231cd76f42","tarball":"https://registry.npmjs.org/history-tree/-/history-tree-2.0.0.tgz","integrity":"sha512-NDn3cz88eSw6ei/NggYC3BmMAt3OaFBdlLNoIb9EFNbMeVTxNJcyD1X6f9cPGq6+EPHOwbo7X/3M5TN9i6szmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJT4V5j5xp0Aid5hz7Npv7TaTtsAdgx8Qi3Jk0yfaSPQIhAMhiLIq9UK+LSTmfKUGJhFcXJfD5c7Rc+k6HnwI1QhrT"}]},"maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}]}},"readme":"# history-tree\n\nTree for tracking reverts and commits on checkpoints.\nCheckpoints can nest arbitrarily deep.\n\n## api\n\n### methods\n\n##### new HistoryTree() -> history tree\n\nConstructor. Creates a history tree.\n\n##### historyTree.checkpoint() -> history sub-tree\n\nSynchronous.\nCreates a new history sub-tree and adds it to the checkpoint stack.\n\n##### historyTree.commit(cb)\n\nAsynchronous.\nRemoves the top sub-tree from the checkpoint stack,\ncalls `accept` on the sub-tree,\nthen emits `commit` on this tree.\nCalls the callback with an Error if the stack is empty.\n\n##### historyTree.revert(cb)\n\nAsynchronous.\nRemoves the top sub-tree from the checkpoint stack,\ncalls `reject` on the sub-tree,\nthen emits `revert` on this tree.\nCalls the callback with an Error if the stack is empty.\n\n##### historyTree.accept(cb)\n\nAsynchronous.\nCalls `commit` on this tree for all checkpoints on the stack, in series.\nDoes NOT call the callback with an Error if the stack is empty.\nEmits event `accepted` on this tree.\n\n##### historyTree.reject(cb)\n\nAsynchronous.\nCalls `revert` on this tree for all checkpoints on the stack, in series.\nDoes NOT call the callback with an Error if the stack is empty.\nEmits event `rejected` on this tree.\n\n### events\n\nHistoryTree is an [AsynchronousEventEmitter](https://github.com/ahultgren/async-eventemitter).\nThis means that HistoryTree's async api calls won't complete until all event listeners call their callback, unless the listener is synchronous.\nSee the AsynchronousEventEmitter api for usage.\n\n##### 'accepted' -> function(subTree, [next])\n\nCalled AFTER the `accept(cb)` on this HistoryTree node.\n\n##### 'rejected' -> function(subTree, [next])\n\nCalled AFTER the `reject(cb)` on this HistoryTree node.\n\n##### 'commit' -> function(subTree, [next])\n\nCalled AFTER every `commit(cb)` on this HistoryTree node.\n\n##### 'revert' -> function(subTree, [next])\n\nCalled AFTER every `revert(cb)` on this HistoryTree node.\n\n\n","maintainers":[{"name":"kumavis","email":"aaron@kumavis.me"}],"time":{"modified":"2022-06-18T20:50:57.392Z","created":"2015-09-14T21:19:45.060Z","1.0.0":"2015-09-14T21:19:45.060Z","1.0.1":"2015-09-14T21:31:50.938Z","2.0.0":"2015-09-15T05:43:19.374Z"},"license":"ISC","readmeFilename":"README.md"}