{"_id":"sequential-hash","_rev":"5-3fcd5add6017c749e811548ba68472f2","name":"sequential-hash","description":"A lexicographical ordered rolling hash","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"sequential-hash","version":"1.0.0","description":"A lexicographical ordered rolling hash","main":"index.js","dependencies":{"lexicographic-integer":"^1.1.0"},"devDependencies":{"standard":"^2.10.0","tape":"^3.5.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/sequential-hash.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/sequential-hash/issues"},"homepage":"https://github.com/mafintosh/sequential-hash","gitHead":"2c3ff5625304d96d6309953c43ac5b13b5838324","_id":"sequential-hash@1.0.0","_shasum":"b1ecb2acdd8f43ae9c892f5d155095d42d627d0c","_from":".","_npmVersion":"2.5.1","_nodeVersion":"1.3.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"b1ecb2acdd8f43ae9c892f5d155095d42d627d0c","tarball":"https://registry.npmjs.org/sequential-hash/-/sequential-hash-1.0.0.tgz","integrity":"sha512-WoV7nZ3zKnp36Gfsu65Q1jLxY4eK+FarCa3bJTULnFN0lK4iOeewYaQjwoIp395HsD9tSzeH2GcTkIpzkh5Xkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdRx1BrCzXGlGa9UNXu2Mcj1Ta44r3CuWotP4hwHKzOgIhAJ6gYWm1hX1Fe4mincAEJPy/HxCqoqxG2oING9FNsYNB"}]}}},"readme":"# sequential-hash\n\nA lexicographical ordered rolling hash\n\n```\nnpm install sequential-hash\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/sequential-hash.svg?style=flat)](http://travis-ci.org/mafintosh/sequential-hash)\n\n## Usage\n\n``` js\nvar seqhash = require('sequential-hash')\nvar hash = seqhash('sha256') // sha256 is the hash algorithm\n\nvar prev = null\nvar words = ['mathias', 'wrote', 'this']\n\nwords.forEach(function (word) {\n  prev = hash(word, prev)\n  console.log(prev + ' -> ' + word)\n})\n```\n\nRunning the above produces\n\n```\n00!c1768bf97517f3da6948ee49b4d7078890c910a9fc07065a382184a4a3d9457a -> mathias\n01!f16200e82c592e37e0f938c12ba4b3d88aa61b1df873ab03b60932956211ec03 -> wrote\n02!34efbd1375266a04c302de321196d0a029bee922ca8044fe2cf8ca38289e3333 -> this\n```\n\n## API\n\n#### `hash = seqhash(algo)`\n\nCreate a rolling hash function based on a hash algorithm (`sha1`, `sha256`, etc)\n\n#### `hashString = hash(value, [previousHash])`\n\nHash a value based on a previous hash. The returned `hashString` is guaranteed to sort\nlexicographically higher than `previousHash`.\n\n## License\n\nMIT\n","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2022-06-26T17:52:12.933Z","created":"2015-03-02T00:59:57.764Z","1.0.0":"2015-03-02T00:59:57.764Z"},"homepage":"https://github.com/mafintosh/sequential-hash","repository":{"type":"git","url":"https://github.com/mafintosh/sequential-hash.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/sequential-hash/issues"},"license":"MIT","readmeFilename":"README.md","users":{"augustohp":true}}