{"_id":"k-bucket","_rev":"481360","name":"k-bucket","description":"Kademlia DHT K-bucket implementation as a binary tree","dist-tags":{"latest":"5.1.0"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"time":{"modified":"2021-08-05T09:38:39.000Z","created":"2013-07-05T05:23:52.004Z","5.1.0":"2021-02-05T04:36:07.401Z","5.0.0":"2018-08-28T23:21:14.148Z","4.0.1":"2018-05-12T19:51:07.608Z","4.0.0":"2018-03-06T23:47:12.580Z","3.3.1":"2017-12-04T17:03:27.720Z","3.3.0":"2017-08-21T16:54:36.591Z","3.2.1":"2016-08-21T23:34:28.875Z","3.2.0":"2016-08-21T16:45:13.899Z","3.1.0":"2016-08-15T17:12:30.677Z","3.0.3":"2016-08-14T19:32:16.798Z","3.0.2":"2016-05-18T02:50:23.902Z","3.0.1":"2016-05-16T15:15:44.734Z","3.0.0":"2016-05-15T16:05:37.918Z","2.0.1":"2016-05-07T16:03:37.299Z","1.0.4":"2016-05-07T15:59:27.194Z","2.0.0":"2016-05-05T00:56:28.825Z","1.0.3":"2016-05-05T00:50:01.245Z","1.0.2":"2016-05-04T01:46:23.435Z","1.0.1":"2016-05-04T01:30:09.260Z","1.0.0":"2016-05-04T01:28:23.147Z","0.6.0":"2015-10-17T18:20:14.380Z","0.5.0":"2015-06-08T22:58:44.453Z","0.4.4":"2015-06-01T23:33:17.755Z","0.4.3":"2015-06-01T23:23:24.069Z","0.4.2":"2014-06-10T13:57:47.719Z","0.4.1":"2014-06-09T11:50:48.859Z","0.4.0":"2014-02-28T01:20:40.423Z","0.3.1":"2014-01-05T18:15:51.650Z","0.3.0":"2014-01-05T18:00:24.647Z","0.2.2":"2013-10-08T17:03:38.128Z","0.2.1":"2013-09-11T18:35:26.775Z","0.2.0":"2013-07-27T03:43:45.511Z","0.1.1":"2013-07-11T21:41:09.817Z","0.1.0":"2013-07-05T05:23:52.004Z"},"users":{"feross":true,"eterna2":true,"carlos8f":true,"shanewholloway":true,"meeh":true},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"versions":{"5.1.0":{"name":"k-bucket","version":"5.1.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"},{"name":"Nazar Mokrynskyi","email":"nazar@mokrynskyi.com"},{"name":"Jimmy Wärting","email":"jimmy@warting.se"},{"name":"Alex Potsides","email":"alex@achingbrain.net"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:add":"node benchmarks/add.js","benchmark:closest":"node benchmarks/closest.js","benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"randombytes":"^2.1.0"},"devDependencies":{"nyc":"^15.1.0","standard":"^16.0.3","tape":"^5.1.1"},"gitHead":"3aa5b4f1dacb835752995a25409ab319d2070b9e","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@5.1.0","_nodeVersion":"15.8.0","_npmVersion":"7.5.2","dist":{"shasum":"db2c9e72bd168b432e3f3e8fc092e2ccb61bff89","size":15331,"noattachment":false,"key":"/k-bucket/-/k-bucket-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-5.1.0.tgz"},"_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"directories":{},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket_5.1.0_1612499767270_0.6664214101611499"},"_hasShrinkwrap":false,"publish_time":1612499767401,"_cnpm_publish_time":1612499767401},"5.0.0":{"name":"k-bucket","version":"5.0.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"},{"name":"Nazar Mokrynskyi","email":"nazar@mokrynskyi.com"},{"name":"Jimmy Wärting","email":"jimmy@warting.se"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:add":"node benchmarks/add.js","benchmark:closest":"node benchmarks/closest.js","benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"randombytes":"^2.0.3"},"devDependencies":{"buffer-equals":"^1.0.3","nyc":"^11.7.3","standard":"^11.0.1","tape":"^4.5.1"},"gitHead":"4348fcb669c42b6f8cfeea243615d95fdce36aa6","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@5.0.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"ef7a401fcd4c37cd31dceaa6ae4440ca91055e01","size":14030,"noattachment":false,"key":"/k-bucket/-/k-bucket-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-5.0.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket_5.0.0_1535498473907_0.9124689760235098"},"_hasShrinkwrap":false,"publish_time":1535498474148,"_cnpm_publish_time":1535498474148},"4.0.1":{"name":"k-bucket","version":"4.0.1","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"},{"name":"Nazar Mokrynskyi","email":"nazar@mokrynskyi.com"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:add":"node benchmarks/add.js","benchmark:closest":"node benchmarks/closest.js","benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"buffer-equals":"^1.0.3","nyc":"^11.7.3","standard":"^11.0.1","tape":"^4.5.1"},"gitHead":"def6cc0f886124789d1a2f4c93accbb5949a215f","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@4.0.1","_npmVersion":"5.6.0","_nodeVersion":"10.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"3fc2e5693f0b7bff90d7b6b476edd6087955d542","size":13704,"noattachment":false,"key":"/k-bucket/-/k-bucket-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-4.0.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket_4.0.1_1526154667366_0.35226290674444916"},"_hasShrinkwrap":false,"publish_time":1526154667608,"_cnpm_publish_time":1526154667608},"4.0.0":{"name":"k-bucket","version":"4.0.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"},{"name":"Nazar Mokrynskyi","email":"nazar@mokrynskyi.com"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:add":"node benchmarks/add.js","benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"buffer-equals":"^1.0.3","nyc":"^11.4.1","standard":"^11.0.0","tape":"^4.5.1"},"gitHead":"6aa4399b6bd90c22552707f107f61ca7aa854d19","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@4.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"3a89715e36bd9a47a702a0bcbc894a9b1ae677ab","size":13590,"noattachment":false,"key":"/k-bucket/-/k-bucket-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-4.0.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket_4.0.0_1520380032517_0.17712637808053455"},"_hasShrinkwrap":false,"publish_time":1520380032580,"_cnpm_publish_time":1520380032580},"3.3.1":{"name":"k-bucket","version":"3.3.1","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"},{"name":"Nazar Mokrynskyi","email":"nazar@mokrynskyi.com"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"42f5ebb7bf80ba56014413e4e9b766de78bd17be","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.3.1","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"de219f00b310ca17fdd7e2790a077d78b70d92c8","size":13300,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.3.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket-3.3.1.tgz_1512407006582_0.6938051071483642"},"directories":{},"publish_time":1512407007720,"_hasShrinkwrap":false,"_cnpm_publish_time":1512407007720},"3.3.0":{"name":"k-bucket","version":"3.3.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"},{"name":"Robert Kowalski","email":"rok@kowalski.gd"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"fd8344584c4f551a62c2164e3909c24090a9313e","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.3.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"cf18eb3407ff12f9fc2f90cbe832fb66999b2989","size":13270,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.3.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/k-bucket-3.3.0.tgz_1503334475592_0.861557284835726"},"directories":{},"publish_time":1503334476591,"_hasShrinkwrap":false,"_cnpm_publish_time":1503334476591},"3.2.1":{"name":"k-bucket","version":"3.2.1","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"9b9c3c05b86e5fdba8d3fce5d636e01fbc10a8ac","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.2.1","_shasum":"200d07f02013436ed67265950ec98f62bb292f62","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"200d07f02013436ed67265950ec98f62bb292f62","size":13089,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.2.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.2.1.tgz_1471822467003_0.7972807730548084"},"directories":{},"publish_time":1471822468875,"_cnpm_publish_time":1471822468875,"_hasShrinkwrap":false},"3.2.0":{"name":"k-bucket","version":"3.2.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"8c00d832a6ec9ee322fe3b1b9f0cc1226904cd13","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.2.0","_shasum":"06511c8b0462bb73d66eba113fa3bc1efdf02071","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"06511c8b0462bb73d66eba113fa3bc1efdf02071","size":13090,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.2.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.2.0.tgz_1471797911923_0.32627507974393666"},"directories":{},"publish_time":1471797913899,"_cnpm_publish_time":1471797913899,"_hasShrinkwrap":false},"3.1.0":{"name":"k-bucket","version":"3.1.0","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"992594f18bfccbfd21c90d5eb4594151b31ff739","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.1.0","_shasum":"f935367c81d8367e89dac1aab838789a2fa6ef47","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"f935367c81d8367e89dac1aab838789a2fa6ef47","size":12815,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.1.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.1.0.tgz_1471281148529_0.8519037333317101"},"directories":{},"publish_time":1471281150677,"_cnpm_publish_time":1471281150677,"_hasShrinkwrap":false},"3.0.3":{"name":"k-bucket","version":"3.0.3","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"97cdfbc8273c781bbab6fa2eefa0aa7f4bbedc02","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.0.3","_shasum":"b0109373c5d25ab0344e448ea7d8c199d4c4fbc4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"b0109373c5d25ab0344e448ea7d8c199d4c4fbc4","size":12588,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.0.3.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/k-bucket-3.0.3.tgz_1471203135049_0.4497189959511161"},"directories":{},"publish_time":1471203136798,"_cnpm_publish_time":1471203136798,"_hasShrinkwrap":false},"3.0.2":{"name":"k-bucket","version":"3.0.2","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","coverage":"nyc tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nyc":"^6.4.4","standard":"^7.0.1","tape":"^4.5.1"},"gitHead":"1b77fc58bcf1eea5e0b7947e05c3a0086d023019","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.0.2","_shasum":"edd9a03976ee936ce13d44c0cc7c2556690c76c2","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"edd9a03976ee936ce13d44c0cc7c2556690c76c2","size":12632,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.0.2.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.0.2.tgz_1463539821623_0.7326922919601202"},"directories":{},"publish_time":1463539823902,"_cnpm_publish_time":1463539823902,"_hasShrinkwrap":false},"3.0.1":{"name":"k-bucket","version":"3.0.1","description":"Kademlia DHT K-bucket implementation as a binary tree","keywords":["k-bucket","kademlia","dht"],"bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT","contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"scripts":{"benchmark:distance":"node benchmarks/distance.js","lint":"standard","test":"npm run lint && npm run unit","unit":"node scripts/test.js"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"devDependencies":{"nodeunit":"0.9.x","standard":"^7.0.1"},"gitHead":"79594658d90c77136e79c4cd292b46ded8c80da6","homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.0.1","_shasum":"7b9f4c9fdb3990ed77e6b9b96eb77f0f2c7a4486","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"7b9f4c9fdb3990ed77e6b9b96eb77f0f2c7a4486","size":12813,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.0.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.0.1.tgz_1463411742618_0.5674516891594976"},"directories":{},"publish_time":1463411744734,"_cnpm_publish_time":1463411744734,"_hasShrinkwrap":false},"3.0.0":{"name":"k-bucket","version":"3.0.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"distance-benchmark":"node benchmarks/distance.js","test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equals":"^1.0.3","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"7dd334dfe00bfb61f90bbb467d3af442cccf2e55","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@3.0.0","_shasum":"ef391b620f301efde3dc0e840cc74d68dd8ea970","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"ef391b620f301efde3dc0e840cc74d68dd8ea970","size":13101,"noattachment":false,"key":"/k-bucket/-/k-bucket-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-3.0.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-3.0.0.tgz_1463328335492_0.1272335851099342"},"directories":{},"publish_time":1463328337918,"_cnpm_publish_time":1463328337918,"_hasShrinkwrap":false},"2.0.1":{"name":"k-bucket","version":"2.0.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"6c331c22913de909eb3345092fce58f97b6294b4","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@2.0.1","_shasum":"58cccb244f563326ba893bf5c06a35f644846daa","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"58cccb244f563326ba893bf5c06a35f644846daa","size":12026,"noattachment":false,"key":"/k-bucket/-/k-bucket-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-2.0.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-2.0.1.tgz_1462637014886_0.5232699534390122"},"directories":{},"publish_time":1462637017299,"_cnpm_publish_time":1462637017299,"_hasShrinkwrap":false},"1.0.4":{"name":"k-bucket","version":"1.0.4","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"824217976b387ac2815a42d7e0073c780d0e4034","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@1.0.4","_shasum":"9d49992a9e81b80bef6553687fdeae37eb93ad13","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"9d49992a9e81b80bef6553687fdeae37eb93ad13","size":12165,"noattachment":false,"key":"/k-bucket/-/k-bucket-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-1.0.4.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/k-bucket-1.0.4.tgz_1462636766182_0.4689743430353701"},"directories":{},"publish_time":1462636767194,"_cnpm_publish_time":1462636767194,"_hasShrinkwrap":false},"2.0.0":{"name":"k-bucket","version":"2.0.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"066319cdc3cde792f5638f5756d6bd0234cad4ae","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@2.0.0","_shasum":"93afaff65b16c4efc811270e320c61c12ac62b1a","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"93afaff65b16c4efc811270e320c61c12ac62b1a","size":12060,"noattachment":false,"key":"/k-bucket/-/k-bucket-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-2.0.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/k-bucket-2.0.0.tgz_1462409787431_0.4224661614280194"},"directories":{},"publish_time":1462409788825,"_cnpm_publish_time":1462409788825,"_hasShrinkwrap":false},"1.0.3":{"name":"k-bucket","version":"1.0.3","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"fdaf330579ee5fd6d62d53ed3b34ec1c399007df","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@1.0.3","_shasum":"874602ebf6082d1b45fd5298463b50ad2dfadbfb","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"874602ebf6082d1b45fd5298463b50ad2dfadbfb","size":12200,"noattachment":false,"key":"/k-bucket/-/k-bucket-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-1.0.3.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-1.0.3.tgz_1462409398562_0.05635511758737266"},"directories":{},"publish_time":1462409401245,"_cnpm_publish_time":1462409401245,"_hasShrinkwrap":false},"1.0.2":{"name":"k-bucket","version":"1.0.2","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"55f47638a59671d9981a5ae75351c3c3b1afe189","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@1.0.2","_shasum":"06cba8e211775e88ea4c1a880bc50cbce583f1fe","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"06cba8e211775e88ea4c1a880bc50cbce583f1fe","size":12226,"noattachment":false,"key":"/k-bucket/-/k-bucket-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-1.0.2.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-1.0.2.tgz_1462326380944_0.6354916351847351"},"directories":{},"publish_time":1462326383435,"_cnpm_publish_time":1462326383435,"_hasShrinkwrap":false},"1.0.1":{"name":"k-bucket","version":"1.0.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"license":"MIT","gitHead":"c4160ecca01448569557b2191e741a882c3fc7fe","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@1.0.1","_shasum":"92c1173e254897229ffe9306c264cfb53447c959","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"92c1173e254897229ffe9306c264cfb53447c959","size":12381,"noattachment":false,"key":"/k-bucket/-/k-bucket-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-1.0.1.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/k-bucket-1.0.1.tgz_1462325408012_0.6944903852418065"},"directories":{},"publish_time":1462325409260,"_cnpm_publish_time":1462325409260,"_hasShrinkwrap":false},"1.0.0":{"name":"k-bucket","version":"1.0.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1","randombytes":"^2.0.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"}],"license":"MIT","gitHead":"951505a77123b42670c496880842823bc9cc0541","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@1.0.0","_shasum":"513696a2048cd9a89177b8880726dd7f5da4b8e5","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"513696a2048cd9a89177b8880726dd7f5da4b8e5","size":12361,"noattachment":false,"key":"/k-bucket/-/k-bucket-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-1.0.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/k-bucket-1.0.0.tgz_1462325300679_0.2599774016998708"},"directories":{},"publish_time":1462325303147,"_cnpm_publish_time":1462325303147,"_hasShrinkwrap":false},"0.6.0":{"name":"k-bucket","version":"0.6.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1","inherits":"^2.0.1"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"},{"name":"Fabien O'Carroll","email":"fabien@allou.is"}],"license":"MIT","gitHead":"020c03091eb26e6e6377e3b0bd0f188a43731296","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket#readme","_id":"k-bucket@0.6.0","_shasum":"afc532545f69d466293e887b00d5fc73377c3abb","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"shasum":"afc532545f69d466293e887b00d5fc73377c3abb","size":12290,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.6.0.tgz"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1445106014380,"_cnpm_publish_time":1445106014380,"_hasShrinkwrap":false},"0.5.0":{"name":"k-bucket","version":"0.5.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1"},"repository":{"type":"git","url":"git@github.com:tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"}],"license":"MIT","gitHead":"d6a77eee0a9227cade188fb2798f73990ecfadbf","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket","_id":"k-bucket@0.5.0","_shasum":"31d462d86cdb2e8d245528acfe5e71382f552e1d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"dist":{"shasum":"31d462d86cdb2e8d245528acfe5e71382f552e1d","size":12232,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.5.0.tgz"},"directories":{},"publish_time":1433804324453,"_cnpm_publish_time":1433804324453,"_hasShrinkwrap":false},"0.4.4":{"name":"k-bucket","version":"0.4.4","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1"},"repository":{"type":"git","url":"git@github.com:tristanls/k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"},{"name":"Nathan Hernandez","email":"email@nathanph.com"}],"license":"MIT","gitHead":"4898bb051c5f70b133e3e719182067bd4bbe9892","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"homepage":"https://github.com/tristanls/k-bucket","_id":"k-bucket@0.4.4","_shasum":"f7a2955754de2fb7a0159a0fc28fcd5fac0c603b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"dist":{"shasum":"f7a2955754de2fb7a0159a0fc28fcd5fac0c603b","size":12150,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.4.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.4.4.tgz"},"directories":{},"publish_time":1433201597755,"_cnpm_publish_time":1433201597755,"_hasShrinkwrap":false},"0.4.3":{"name":"k-bucket","version":"0.4.3","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"}],"license":"MIT","gitHead":"5dcacd32b64fed53e7080828396a5376271e9262","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.4.3","_shasum":"f9bcac555c8fa5f96aad0463783d488f8173e6ba","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"dist":{"shasum":"f9bcac555c8fa5f96aad0463783d488f8173e6ba","size":12135,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.4.3.tgz"},"directories":{},"publish_time":1433201004069,"_cnpm_publish_time":1433201004069,"_hasShrinkwrap":false},"0.4.2":{"name":"k-bucket","version":"0.4.2","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"}],"license":"MIT","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.4.2","_shasum":"150ab92307e9ec818a9c4e39a5f930eb3aaaa23a","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"dist":{"shasum":"150ab92307e9ec818a9c4e39a5f930eb3aaaa23a","size":11919,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.4.2.tgz"},"directories":{},"publish_time":1402408667719,"_cnpm_publish_time":1402408667719,"_hasShrinkwrap":false},"0.4.1":{"name":"k-bucket","version":"0.4.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.9.x"},"dependencies":{"buffer-equal":"0.0.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"},{"name":"Feross Aboukhadijeh","email":"feross@feross.org"}],"license":"MIT","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.4.1","_shasum":"5f48aa6daf948273e1647e3c5d9a3b12a9389f76","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"dist":{"shasum":"5f48aa6daf948273e1647e3c5d9a3b12a9389f76","size":11836,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.4.1.tgz"},"directories":{},"publish_time":1402314648859,"_cnpm_publish_time":1402314648859,"_hasShrinkwrap":false},"0.4.0":{"name":"k-bucket","version":"0.4.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.8.x"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"}],"license":"MIT","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.4.0","dist":{"shasum":"dde403f7cb149fd2b63292dea38ae78e7a97356d","size":11870,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.4.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1393550440423,"_cnpm_publish_time":1393550440423,"_hasShrinkwrap":false},"0.3.1":{"name":"k-bucket","version":"0.3.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.8.x"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"}],"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.3.1","dist":{"shasum":"6533d6b1623a87c7dc7c375b60729eefbbc93623","size":11049,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.3.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1388945751650,"_cnpm_publish_time":1388945751650,"_hasShrinkwrap":false},"0.3.0":{"name":"k-bucket","version":"0.3.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","devDependencies":{"nodeunit":"0.8.x"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz"}],"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"homepage":"https://github.com/tristanls/node-k-bucket","_id":"k-bucket@0.3.0","dist":{"shasum":"3fb9d0c5bc1a7ad6dc15161c994b8d2c1ca892d1","size":11039,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1388944824647,"_cnpm_publish_time":1388944824647,"_hasShrinkwrap":false},"0.2.2":{"name":"k-bucket","version":"0.2.2","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","dependencies":{"buffertools":"1.1.1"},"devDependencies":{"nodeunit":"0.8.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},{"name":"Mike de Boer","email":"info@mikedeboer.nl"}],"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"_id":"k-bucket@0.2.2","dist":{"shasum":"ce14ddabe6fa1d621badab6680c97ce3e35719fa","size":9638,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1381251818128,"_cnpm_publish_time":1381251818128,"_hasShrinkwrap":false},"0.2.1":{"name":"k-bucket","version":"0.2.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","dependencies":{"buffertools":"1.1.1"},"devDependencies":{"nodeunit":"0.8.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"author":{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"_id":"k-bucket@0.2.1","dist":{"shasum":"f7352b063da68d7693217478d7ec3440dcf0611d","size":9586,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1378924526775,"_cnpm_publish_time":1378924526775,"_hasShrinkwrap":false},"0.2.0":{"name":"k-bucket","version":"0.2.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","dependencies":{"buffertools":"1.1.1"},"devDependencies":{"nodeunit":"0.8.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"author":{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"_id":"k-bucket@0.2.0","dist":{"shasum":"a97c2ff0ead8d6077ba662777d5c4b14ad07f6ee","size":9149,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1374896625511,"_cnpm_publish_time":1374896625511,"_hasShrinkwrap":false},"0.1.1":{"name":"k-bucket","version":"0.1.1","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","dependencies":{"buffertools":"1.1.1"},"devDependencies":{"nodeunit":"0.8.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"author":{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"_id":"k-bucket@0.1.1","dist":{"shasum":"bfd2d94d71916ac4159fbce8bbd0d4b536e28225","size":8996,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1373578869817,"_cnpm_publish_time":1373578869817,"_hasShrinkwrap":false},"0.1.0":{"name":"k-bucket","version":"0.1.0","description":"Kademlia DHT K-bucket implementation as a binary tree","scripts":{"test":"node scripts/test.js"},"main":"index.js","dependencies":{"buffertools":"1.1.1"},"devDependencies":{"nodeunit":"0.8.1"},"repository":{"type":"git","url":"git@github.com:tristanls/node-k-bucket.git"},"keywords":["k-bucket","kademlia","dht"],"author":{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/tristanls/node-k-bucket/issues"},"_id":"k-bucket@0.1.0","dist":{"shasum":"fe1474a5bfa65eb7425e38aa622c69e96f096df7","size":7588,"noattachment":false,"key":"/k-bucket/-/k-bucket-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/k-bucket/download/k-bucket-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"publish_time":1373001832004,"_cnpm_publish_time":1373001832004,"_hasShrinkwrap":false}},"readme":"# k-bucket\n\n_Stability: 2 - [Stable](https://github.com/tristanls/stability-index#stability-2---stable)_\n\n[![NPM version](https://badge.fury.io/js/k-bucket.png)](http://npmjs.org/package/k-bucket)\n\nKademlia DHT K-bucket implementation as a binary tree.\n\n## Contributors\n\n[@tristanls](https://github.com/tristanls), [@mikedeboer](https://github.com/mikedeboer), [@deoxxa](https://github.com/deoxxa), [@feross](https://github.com/feross), [@nathanph](https://github.com/nathanph), [@allouis](https://github.com/allouis), [@fanatid](https://github.com/fanatid), [@robertkowalski](https://github.com/robertkowalski), [@nazar-pc](https://github.com/nazar-pc), [@jimmywarting](https://github.com/jimmywarting), [@achingbrain](https://github.com/achingbrain)\n\n## Installation\n\n    npm install k-bucket\n\n## Tests\n\n    npm test\n\n## Usage\n\n```javascript\nconst KBucket = require('k-bucket')\n\nconst kBucket1 = new KBucket({\n    localNodeId: Buffer.from('my node id') // default: random data\n})\n// or without using Buffer (for example, in the browser)\nconst id = 'my node id'\nconst nodeId = new Uint8Array(id.length)\nfor (let i = 0, len = nodeId.length; i < len; ++i) {\n  nodeId[i] = id.charCodeAt(i)\n}\nconst kBucket2 = new KBucket({\n  localNodeId: nodeId // default: random data\n})\n```\n\n## Overview\n\nA [*Distributed Hash Table (DHT)*](http://en.wikipedia.org/wiki/Distributed_hash_table) is a decentralized distributed system that provides a lookup table similar to a hash table.\n\n*k-bucket* is an implementation of a storage mechanism for keys within a DHT. It stores `contact` objects which represent locations and addresses of nodes in the decentralized distributed system. `contact` objects are typically identified by a SHA-1 hash, however this restriction is lifted in this implementation. Additionally, node ids of different lengths can be compared.\n\nThis Kademlia DHT k-bucket implementation is meant to be as minimal as possible. It assumes that `contact` objects consist only of `id`. It is useful, and necessary, to attach other properties to a `contact`. For example, one may want to attach `ip` and `port` properties, which allow an application to send IP traffic to the `contact`. However, this information is extraneous and irrelevant to the operation of a k-bucket.\n\n### arbiter function\n\nThis *k-bucket* implementation implements a conflict resolution mechanism using an `arbiter` function. The purpose of the `arbiter` is to choose between two `contact` objects with the same `id` but perhaps different properties and determine which one should be stored.  As the `arbiter` function returns the actual object to be stored, it does not need to make an either/or choice, but instead could perform some sort of operation and return the result as a new object that would then be stored. See [kBucket._update(node, index, contact)](#kbucket_updatenode-index-contact) for detailed semantics of which `contact` (`incumbent` or `candidate`) is selected.\n\nFor example, an `arbiter` function implementing a `vectorClock` mechanism would look something like:\n\n```javascript\n// contact example\nvar contact = {\n    id: Buffer.from('contactId'),\n    vectorClock: 0\n};\n\nfunction arbiter(incumbent, candidate) {\n    if (incumbent.vectorClock > candidate.vectorClock) {\n        return incumbent;\n    }\n    return candidate;\n};\n```\n\nAlternatively, consider an arbiter that implements a Grow-Only-Set CRDT mechanism:\n\n```javascript\n// contact example\nconst contact = {\n    id: Buffer.from('workerService'),\n    workerNodes: {\n        '17asdaf7effa2': { host: '127.0.0.1', port: 1337 },\n        '17djsyqeryasu': { host: '127.0.0.1', port: 1338 }\n    }\n};\n\nfunction arbiter(incumbent, candidate) {\n    // we create a new object so that our selection is guaranteed to replace\n    // the incumbent\n    const merged = {\n        id: incumbent.id, // incumbent.id === candidate.id within an arbiter\n        workerNodes: incumbent.workerNodes\n    }\n\n    Object.keys(candidate.workerNodes).forEach(workerNodeId => {\n        merged.workerNodes[workerNodeId] = candidate.workerNodes[workerNodeId];\n    })\n\n    return merged\n}\n```\n\nNotice that in the above case, the Grow-Only-Set assumes that each worker node has a globally unique id.\n\n## Documentation\n\n### KBucket\n\nImplementation of a Kademlia DHT k-bucket used for storing contact (peer node) information.\n\nFor a step by step example of k-bucket operation you may find the following slideshow useful: [Distribute All The Things](https://docs.google.com/presentation/d/11qGZlPWu6vEAhA7p3qsQaQtWH7KofEC9dMeBFZ1gYeA/edit#slide=id.g1718cc2bc_0661).\n\nKBucket starts off as a single k-bucket with capacity of _k_. As contacts are added, once the _k+1_ contact is added, the k-bucket is split into two k-buckets. The split happens according to the first bit of the contact node id. The k-bucket that would contain the local node id is the \"near\" k-bucket, and the other one is the \"far\" k-bucket. The \"far\" k-bucket is marked as _don't split_ in order to prevent further splitting. The contact nodes that existed are then redistributed along the two new k-buckets and the old k-bucket becomes an inner node within a tree data structure.\n\nAs even more contacts are added to the \"near\" k-bucket, the \"near\" k-bucket will split again as it becomes full. However, this time it is split along the second bit of the contact node id. Again, the two newly created k-buckets are marked \"near\" and \"far\" and the \"far\" k-bucket is marked as _don't split_. Again, the contact nodes that existed in the old bucket are redistributed. This continues as long as nodes are being added to the \"near\" k-bucket, until the number of splits reaches the length of the local node id.\n\nAs more contacts are added to the \"far\" k-bucket and it reaches its capacity, it does not split. Instead, the k-bucket emits a \"ping\" event (register a listener: `kBucket.on('ping', function (oldContacts, newContact) {...});` and includes an array of old contact nodes that it hasn't heard from in a while and requires you to confirm that those contact nodes still respond (literally respond to a PING RPC). If an old contact node still responds, it should be re-added (`kBucket.add(oldContact)`) back to the k-bucket. This puts the old contact on the \"recently heard from\" end of the list of nodes in the k-bucket. If the old contact does not respond, it should be removed (`kBucket.remove(oldContact.id)`) and the new contact being added now has room to be stored (`kBucket.add(newContact)`).\n\n**Public API**\n  * [KBucket.arbiter(incumbent, candidate)](#kbucketarbiterincumbent-candidate)\n  * [KBucket.distance(firstId, secondId)](#kbucketdistancefirstid-secondid)\n  * [new KBucket(options)](#new-kbucketoptions)\n  * [kBucket.add(contact)](#kbucketaddcontact)\n  * [kBucket.closest(id [, n = Infinity])](#kbucketclosestid--n--infinity)\n  * [kBucket.count()](#kbucketcount)\n  * [kBucket.get(id)](#kbucketgetid)\n  * [kBucket.metadata](#kbucketmetadata)\n  * [kBucket.remove(id)](#kbucketremoveid)\n  * [kBucket.toArray()](#kbuckettoarray)\n  * [kBucket.toIterable()](#kbuckettoiterable)\n  * [Event 'added'](#event-added)\n  * [Event 'ping'](#event-ping)\n  * [Event 'removed'](#event-removed)\n  * [Event 'updated'](#event-updated)\n\n#### KBucket.arbiter(incumbent, candidate)\n\n  * `incumbent`: _Object_ Contact currently stored in the k-bucket.\n  * `candidate`: _Object_ Contact being added to the k-bucket.\n  * Return: _Object_ Contact to updated the k-bucket with.\n\nDefault arbiter function for contacts with the same `id`. Uses `contact.vectorClock` to select which contact to update the k-bucket with. Contact with larger `vectorClock` field will be selected. If `vectorClock` is the same, `candidat` will be selected.\n\n#### KBucket.distance(firstId, secondId)\n\n  * `firstId`: _Uint8Array_ Uint8Array containing first id.\n  * `secondId`: _Uint8Array_ Uint8Array containing second id.\n  * Return: _Integer_ The XOR distance between `firstId` and `secondId`.\n\nDefault distance function. Finds the XOR distance between firstId and secondId.\n\n#### new KBucket(options)\n\n  * `options`:\n    * `arbiter`: _Function_ _(Default: vectorClock arbiter)_\n        `function (incumbent, candidate) { return contact; }` An optional `arbiter` function that given two `contact` objects with the same `id` returns the desired object to be used for updating the k-bucket. For more details, see [arbiter function](#arbiter-function).\n    * `distance`: _Function_\n        `function (firstId, secondId) { return distance }` An optional `distance` function that gets two `id` Uint8Arrays and return distance (as number) between them.\n    * `localNodeId`: _Uint8Array_ An optional Uint8Array representing the local node id. If not provided, a local node id will be created via `crypto.randomBytes(20)`.\n    * `metadata`: _Object_ _(Default: {})_ Optional satellite data to include with the k-bucket. `metadata` property is guaranteed not be altered, it is provided as an explicit container for users of k-bucket to store implementation-specific data.\n    * `numberOfNodesPerKBucket`: _Integer_ _(Default: 20)_ The number of nodes that a k-bucket can contain before being full or split.\n    * `numberOfNodesToPing`: _Integer_ _(Default: 3)_ The number of nodes to ping when a bucket that should not be split becomes full. KBucket will emit a `ping` event that contains `numberOfNodesToPing` nodes that have not been contacted the longest.\n\nCreates a new KBucket.\n\n#### kBucket.add(contact)\n\n  * `contact`: _Object_ The contact object to add.\n    * `id`: _Uint8Array_ Contact node id.\n    * Any satellite data that is part of the `contact` object will not be altered, only `id` is used.\n  * Return: _Object_ The k-bucket itself.\n\nAdds a `contact` to the k-bucket.\n\n#### kBucket.closest(id [, n = Infinity])\n\n  * `id`: _Uint8Array_ Contact node id.\n  * `n`: _Integer_ _(Default: Infinity)_ The maximum number of closest contacts to return.\n  * Return: _Array_ Maximum of `n` closest contacts to the node id.\n\nGet the `n` closest contacts to the provided node id. \"Closest\" here means: closest according to the XOR metric of the `contact` node id.\n\n#### kBucket.count()\n\n  * Return: _Number_ The number of contacts held in the tree\n\nCounts the total number of contacts in the tree.\n\n#### kBucket.get(id)\n\n  * `id`: _Uint8Array_ The ID of the `contact` to fetch.\n  * Return: _Object_ The `contact` if available, otherwise null\n\nRetrieves the `contact`.\n\n#### kBucket.metadata\n\n  * `metadata`: _Object_ _(Default: {})_\n\nThe `metadata` property serves as a container that can be used by implementations using k-bucket. One example is storing a timestamp to indicate the last time when a node in the bucket was responding to a ping.\n\n#### kBucket.remove(id)\n\n  * `id`: _Uint8Array_ The ID of the `contact` to remove.\n  * Return: _Object_ The k-bucket itself.\n\nRemoves `contact` with the provided `id`.\n\n#### kBucket.toArray()\n\n  * Return: _Array_ All of the contacts in the tree, as an array\n\nTraverses the tree, putting all the contacts into one array.\n\n#### kBucket.toIterable()\n\n  * Return: _Iterable_ All of the contacts in the tree, as an iterable\n\nTraverses the tree, yielding contacts as they are encountered.\n\n#### kBucket._determineNode(node, id [, bitIndex = 0])\n\n_**CAUTION: reserved for internal use**_\n\n  * `node`: internal object that has 2 leafs: left and right\n  * `id`: _Uint8Array_ Id to compare `localNodeId` with.\n  * `bitIndex`: _Integer_ _(Default: 0)_  The bit index to which bit to check in the `id` Uint8Array.\n  * Return: _Object_ left leaf if `id` at `bitIndex` is 0, right leaf otherwise.\n\n#### kBucket._indexOf(id)\n\n_**CAUTION: reserved for internal use**_\n\n  * `node`: internal object that has 2 leafs: left and right\n  * `id`: _Uint8Array_ Contact node id.\n  * Return: _Integer_ Index of `contact` with provided `id` if it exists, -1 otherwise.\n\nReturns the index of the `contact` with provided `id` if it exists, returns -1 otherwise.\n\n#### kBucket._split(node [, bitIndex])\n\n_**CAUTION: reserved for internal use**_\n\n  * `node`: _Object_ node for splitting\n  * `bitIndex`: _Integer_ _(Default: 0)_ The bit index to which bit to check in the `id` Uint8Array.\n\nSplits the node, redistributes contacts to the new nodes, and marks the node that was split as an inner node of the binary tree of nodes by setting `self.contacts = null`. Also, marks the \"far away\" node as `dontSplit`.\n\n#### kBucket._update(node, index, contact)\n\n_**CAUTION: reserved for internal use**_\n\n  * `node`: internal object that has 2 leafs: left and right\n  * `index`: _Integer_ The index in the bucket where contact exists (index has already been computed in previous calculation).\n  * `contact`: _Object_ The contact object to update.\n    * `id`: _Uint8Array_ Contact node id\n    * Any satellite data that is part of the `contact` object will not be altered, only `id` is used.\n\nUpdates the `contact` by using the `arbiter` function to compare the incumbent and the candidate. If `arbiter` function selects the old `contact` but the candidate is some new `contact`, then the new `contact` is abandoned. If `arbiter` function selects the old `contact` and the candidate is that same old `contact`, the `contact` is marked as most recently contacted (by being moved to the right/end of the bucket array). If `arbiter` function selects the new `contact`, the old `contact` is removed and the new `contact` is marked as most recently contacted.\n\n#### Event: 'added'\n\n  * `newContact`: _Object_ The new contact that was added.\n\nEmitted only when `newContact` was added to bucket and it was not stored in the bucket before.\n\n#### Event: 'ping'\n\n  * `oldContacts`: _Array_ The array of contacts to ping.\n  * `newContact`: _Object_ The new contact to be added if one of old contacts does not respond.\n\nEmitted every time a contact is added that would exceed the capacity of a _don't split_ k-bucket it belongs to.\n\n#### Event: 'removed'\n\n  * `contact`: _Object_ The contact that was removed.\n\nEmitted when `contact` was removed from the bucket.\n\n#### Event: 'updated'\n\n  * `oldContact`: _Object_ The contact that was stored prior to the update.\n  * `newContact`: _Object_ The new contact that is now stored after the update.\n\nEmitted when a previously existing (\"previously existing\" means `oldContact.id` equals `newContact.id`) contact was added to the bucket and it was replaced with `newContact`.\n\n## Releases\n\n[Current releases](https://github.com/tristanls/k-bucket/releases).\n\n### Policy\n\nWe follow the semantic versioning policy ([semver.org](http://semver.org/)) with a caveat:\n\n> Given a version number MAJOR.MINOR.PATCH, increment the:\n>\n>MAJOR version when you make incompatible API changes,<br/>\n>MINOR version when you add functionality in a backwards-compatible manner, and<br/>\n>PATCH version when you make backwards-compatible bug fixes.\n\n**caveat**: Major version zero is a special case indicating development version that may make incompatible API changes without incrementing MAJOR version.\n\n## Sources\n\nThe implementation has been sourced from:\n\n  - [A formal specification of the Kademlia distributed hash table](http://maude.sip.ucm.es/kademlia/files/pita_kademlia.pdf)\n  - [Distributed Hash Tables (part 2)](https://web.archive.org/web/20140217064545/http://offthelip.org/?p=157)\n","_attachments":{},"homepage":"https://github.com/tristanls/k-bucket#readme","bugs":{"url":"https://github.com/tristanls/k-bucket/issues"},"license":"MIT"}