{"_id":"persistent-hash-trie","_rev":"19-2f4ca2b9a0033ec4e9ed47da7ef393ba","name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","dist-tags":{"latest":"0.4.2"},"versions":{"0.2.3":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.2.3","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","prepublish":"npm test","benchmark":"node benchmark/benchmarks.js"},"dependencies":{"string-hash":"1.1.0"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","opera/10.0","opera/12.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### transient\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.transient(trie) //= { key: 'val' }\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar im = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run-script benchmark` are your friends.\n","readmeFilename":"README.markdown","_id":"persistent-hash-trie@0.2.3","dist":{"shasum":"f81ab21d47db8140e1287607931306d17355c2ba","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.2.3.tgz","integrity":"sha512-ePZvQoVHfA3KBUM0JXcgdqwCod9aVXiLiE3Fxsfr3CIGPc9iC3MFC1zU+jVyySq/Ruv0q4QLQn8rsAYoDWgtoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0KYz8rOjT4HjXjeO66wlwlQNd78QfLOsGAuxZabauUAiEA2UaNKnIwXwMbJqBUAcThBoHfu+BaQOzY4tXL8yuLQ1Q="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.2.4":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.2.4","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","prepublish":"npm test","benchmark":"node benchmark/benchmarks.js"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","opera/10.0","opera/12.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### transient\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.transient(trie) //= { key: 'val' }\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar im = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run-script benchmark` are your friends.\n","readmeFilename":"README.markdown","_id":"persistent-hash-trie@0.2.4","dist":{"shasum":"8bda1bece1f717349908b44b6e0be408bd80114c","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.2.4.tgz","integrity":"sha512-3RAlUnyVDaRK9uuI75g/5gcUmjES4Y6pD0rb0c7Qmt2LPTXQAfgRTNR1aBFoY+HWqhSjt3yYvBu8gKwaPr1aDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+BBbX4a+BEaX8h62CV0uJgkQKFoXV32ppnoz6hwxr1AIhAL8Ynu8Vk7xidxF69dEODhGu7rzz+Y68zjabXwNmwmZl"}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.3.0":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.3.0","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","prepublish":"npm test","benchmark":"node benchmark/benchmarks.js"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","opera/10.0","opera/12.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar im = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run-script benchmark` are your friends.\n","readmeFilename":"README.markdown","_id":"persistent-hash-trie@0.3.0","dist":{"shasum":"f8483ac6e6dda3d5b8d5d6cc81a3a3cad14f55f3","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.3.0.tgz","integrity":"sha512-oRtf7AaUaGlFG9T3zjbfYrf7Q7c8bDrnMRT/cqVFmf1yb/PtBqjI3fow5XPFvFGEFGePuBh+0RtmvH13N340UQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlcqft+VbSoDjSFQx9/Xeh/E8p5gJvFzfWoh+ypwR9ygIgKAcoTFgX9EKsoX5VRfMI377eicFHmTfILpeiE/QB9kc="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.3.1":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.3.1","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","prepublish":"npm test","benchmark":"node benchmark/benchmarks.js"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","opera/10.0","opera/12.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run benchmark` are your friends.\n","readmeFilename":"README.markdown","_id":"persistent-hash-trie@0.3.1","dist":{"shasum":"a0a968478fb4d59d9285e976118ccc148f21a3db","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.3.1.tgz","integrity":"sha512-pZ4f71+Kx8nfDWmli37xpmBW66AL9fu/NHex2ls1kT9rimyLAXYKLRF/AvhOhGTs25Z8D2puPpd57/jmwpiXCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8fjVZhJlGmKm5V11NB8JQphCB5qVNEb2rC6bglPmp+gIhAOFTHm20evOC7sP0WyflakjZjtn+Ay/Oggjcnz0fWnU0"}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.3.2":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.3.2","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","prepublish":"npm test","benchmark":"node benchmark/benchmarks.js"},"dependencies":{"string-hash":"1.1.0"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0","format-number":"0.0.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run benchmark` are your friends.\n","readmeFilename":"README.markdown","_id":"persistent-hash-trie@0.3.2","dist":{"shasum":"83a8edd895e993c5b11625822b278e2b497f967c","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.3.2.tgz","integrity":"sha512-ac0iqKVEsle0MC4XHd0TiEHYkL7Ul5Ma6Ev13nYOxlgfqTCJ7ctFWByuSLr/rhQou/Brb9t+rzDmLBTO4NBcxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMGK5Tr9AWckw0q0Ga36Ncv3jC5LyNdaF8C0adEMKpBAiALunhdN9eMfSds8seOOR23QOHWb9OOp3RXTI877NQ+2w=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.4.0":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.4.0","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","benchmark":"node benchmark/benchmarks.js"},"dependencies":{"string-hash":"1.1.0"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0","format-number":"0.0.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### reduce\n\nThe traditional reduce - requires seed.\n\n```javascript\n// definition of `mutable` using reduce:\n\nvar mutable = function(node){\n    return p.reduce(node, addKeyVal, {})\n}\n\nvar addKeyVal = function(o, val, key){\n    o[key] = val\n    return o\n}\n```\n\nCan be cancelled early:\n\n```javascript\n\nvar some = function(node, predicate){\n\treturn p.reduce(node, function(seed, value){\n\t\tif ( !predicate(value)) throw new p.reduce.Break(false)\n\t\telse                    return true\n\t}, true)\n}\n```\n\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run benchmark` are your friends.\n","readmeFilename":"README.markdown","bugs":{"url":"https://github.com/hughfdjackson/persistent-hash-trie/issues"},"_id":"persistent-hash-trie@0.4.0","dist":{"shasum":"1159eb799979a6286aaed4184e0f50abc29cda7f","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.4.0.tgz","integrity":"sha512-2tsSASYXvwGNjjj1Ub3mcfbzWEM1HNLeuDTYifRrVI5RTv1XNMNQ6JkJQ90g9kHAYdA3hW6iAVrqUtfBGdOQtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzpnNQLvFWz4BF3lYWbRCF56nzBhRpdlpcnUahNpW0uAiB0xoxysIkZi+gTuLPpRQBy7CWT+bRmxmNHVrcfbmSYfg=="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.4.1":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.4.1","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","benchmark":"node benchmark/benchmarks.js"},"dependencies":{"string-hash":"1.1.0"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0","format-number":"0.0.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### reduce\n\nThe traditional reduce - requires seed.\n\n```javascript\n// definition of `mutable` using reduce:\n\nvar mutable = function(node){\n    return p.reduce(node, addKeyVal, {})\n}\n\nvar addKeyVal = function(o, val, key){\n    o[key] = val\n    return o\n}\n```\n\nCan be cancelled early:\n\n```javascript\n\nvar some = function(node, predicate){\n\treturn p.reduce(node, function(seed, value){\n\t\tif ( !predicate(value)) return p.reduce.Break(false)\n\t\telse                    return true\n\t}, true)\n}\n```\n\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run benchmark` are your friends.\n","readmeFilename":"README.markdown","bugs":{"url":"https://github.com/hughfdjackson/persistent-hash-trie/issues"},"_id":"persistent-hash-trie@0.4.1","dist":{"shasum":"41f773964bac120524fe6b4ac988fcdf0e93524c","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.4.1.tgz","integrity":"sha512-saGnPSHKNI8Oba2Djf8nlE4I8jFcbkv9vbgXo+SNAijJvF50yp0KhL9BcMObax/RnfKL2wcV8vUJfR42SDod7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIqd0saPe6c3EygIdIeGsnPw2mPxl8K+I51SZIGCvPpAiEA9NZYGZ614+C8smORuLbRssLFPVM9drLPxpFuu2cevq4="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]},"0.4.2":{"name":"persistent-hash-trie","description":"Pure string:val storage, using structural sharing","version":"0.4.2","main":"src/persistent-hash-trie.js","scripts":{"test":"mocha","benchmark":"node benchmark/benchmarks.js"},"dependencies":{"string-hash":"1.1.0"},"devDependencies":{"mocha":"1.8.1","lodash":"1.0.1","benchmark":"1.0.0","microtime":"0.3.3","better-stack-traces":"0.0.4","string-hash":"1.1.0","format-number":"0.0.0","mori":"0.2.0"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"},"testling":{"files":"test/*-test.js","browsers":["iexplore/6.0","iexplore/7.0","iexplore/8.0","iexplore/9.0","iexplore/10.0","chrome/4.0","chrome/23.0","firefox/3.0","firefox/17.0","safari/5.0.5","safari/5.1"],"harness":"mocha"},"keywords":["persistent","hash","trie","pure","functional","datastructure","bagwell","clojure","immutability"],"author":{"name":"hughfdjackson"},"license":"BSD","readme":"# NOTE\nThis project is no longer actively supported.  If anyone is interested in becoming the new maintainer, don't hesitate to contact me (hughfdjackson@googlemail.com).\n\nFor an alternative, consider [https://npmjs.org/package/mori](https://npmjs.org/package/mori). \n\n# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### mutable\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.mutable(trie) //= { key: 'val' }\n```\n\n### keys\n\nReturns an array of all keys in the trie\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.keys(trie) //= ['key']\n```\n\n### reduce\n\nThe traditional reduce - requires seed.\n\n```javascript\n// definition of `mutable` using reduce:\n\nvar mutable = function(node){\n    return p.reduce(node, addKeyVal, {})\n}\n\nvar addKeyVal = function(o, val, key){\n    o[key] = val\n    return o\n}\n```\n\nCan be cancelled early:\n\n```javascript\n\nvar some = function(node, predicate){\n\treturn p.reduce(node, function(seed, value){\n\t\tif ( !predicate(value)) return p.reduce.Break(false)\n\t\telse                    return true\n\t}, true)\n}\n```\n\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run benchmark` are your friends.\n","readmeFilename":"README.markdown","bugs":{"url":"https://github.com/hughfdjackson/persistent-hash-trie/issues"},"_id":"persistent-hash-trie@0.4.2","dist":{"shasum":"4044b2fe82d723e6cecd963213f4c4c76a112552","tarball":"https://registry.npmjs.org/persistent-hash-trie/-/persistent-hash-trie-0.4.2.tgz","integrity":"sha512-7QYLjGjIhpoyYuQT+v2STXdmtR+/NnvpxOaDkXlnyKNAf8+PeYDsQCPzNQtMJdFZBRLewVEes3JLmrElMiVsmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGqFTKEszsoK9uD2IkiFc24r6GUYINRW9n3YzdxWnUfKAiEA9nX/Mnqa6jD2yURMxPJzUf79E+LXk6sQ55uVl6LI4Qw="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"},"maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}]}},"readme":"# persistent-hash-trie\n\nPure string:val storage, using structural sharing.\n\n[![browser support](https://ci.testling.com/hughfdjackson/persistent-hash-trie.png)](https://ci.testling.com/hughfdjackson/persistent-hash-trie)\n\n## Why\n\nThis module forms a possible basis for effecient persistent datastructures; such as those found in Clojure's PersistentHashMap and PersistentVector.\n\n## Install\n\n`npm install persistent-hash-trie`\n\n## Docs\n\n### Trie\n\n```javascript\nvar p = require('persistent-hash-trie')\n\nvar trie = p.Trie()\n```\n\n### assoc\n\nReturns a new Trie with the new key:value keys added.\n\n```javascript\nvar trie1 = p.Trie()\nvar trie2 = p.assoc(trie1, 'key', { value: true })\n```\n\n### dissoc\n\nReturns a new Trie without a specific key\n\n```javascript\nvar trie1 = p.assoc(p.Trie(), 'key', 'val')\nvar trie2 = p.dissoc(trie2, 'key')\n```\n\n### get\n\nRetrieves a value from a Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.get(trie, 'key') //= 'val'\n```\n\n### has\n\nReturns `true` or `false`, depending on whether the value is in the Trie.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.has(trie, 'key') \t\t//= true\np.has(trie, 'not-in-here') //= false\n```\n\n### transient\n\nReturns a mutable copy of a Trie, in the form of a js object.\n\n```javascript\nvar trie = p.assoc(p.Trie(), 'key', 'val')\np.transient(trie) //= { key: 'val' }\n```\n\n### Extending assoc/dissoc/get/has\n\nThe hashing and equality functions used on the keys can be overidden by passing an opts object to `assoc`, `dissoc`, `get` and `has`.\n\n```javascript\nvar im = require('persistent-hash-trie')\n\nvar opts = {\n\teq: function(a, b){ return a === b},\n\thash: function(key){ return parseInt(key, 10) }\n}\n\nvar vector = p.assoc(p.Trie(), 3, 'my-val', opts)\nvar val = p.get(vector, 3, opts)\nvar vector2 = p.dissoc(vector, 3, opts)\np.has(vector2, 3, opts) // false\n```\n\n## Running tests and benchmarks\n\n`npm test` and `npm run-script benchmark` are your friends.\n","maintainers":[{"name":"hughfdjackson","email":"hughfdjackson@googlemail.com"}],"time":{"modified":"2022-06-23T18:56:06.318Z","created":"2013-03-27T13:10:09.196Z","0.2.3":"2013-03-27T13:10:10.770Z","0.2.4":"2013-03-29T02:00:10.251Z","0.3.0":"2013-03-29T22:57:52.522Z","0.3.1":"2013-03-31T01:59:58.517Z","0.3.2":"2013-04-03T22:52:58.125Z","0.4.0":"2013-05-23T20:21:53.924Z","0.4.1":"2013-05-24T19:24:23.492Z","0.4.2":"2014-01-08T09:18:27.471Z"},"author":{"name":"hughfdjackson"},"repository":{"type":"git","url":"https://github.com/hughfdjackson/persistent-hash-trie.git"}}