{"name":"ipv4-peers","version":"1.1.0","description":"An abstract-encoding compliant encoder for encoding a list of ipv4 peers to buffers","main":"index.js","dependencies":{},"devDependencies":{"standard":"^7.1.2","tape":"^4.6.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/ipv4-peers.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/ipv4-peers/issues"},"homepage":"https://github.com/mafintosh/ipv4-peers","gitHead":"e40c9f9cd7d9f71a23b0c0e922c5819e47b79f00","_id":"ipv4-peers@1.1.0","_shasum":"1f46f1efc2b574eb3cd8f61cbd567661216040fd","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.4.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"1f46f1efc2b574eb3cd8f61cbd567661216040fd","tarball":"http://registry-npm.ywwl.com/ipv4-peers/download/ipv4-peers-1.1.0.tgz","integrity":"sha512-DGwkrCXKyytak5xeyEWqwO0UQ3LSDgEzIyheDbeXQgbfIbuD7c8U0hhOyU6qTdK0SCP+P5koH25q51O3i+MvPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6AegLpfj3Dk4jO0hQeEacyDmMVHdrMAEv3lj57FHoUAiEA/fMryBGgxbXMm3duUvdXsiPrehHh7XMU7J7tBpQeO8w="}],"size":2485,"noattachment":false,"key":"/ipv4-peers/-/ipv4-peers-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ipv4-peers-1.1.0.tgz_1473085344423_0.21252116584219038"},"directories":{},"readme":"# ipv4-peers\n\nAn [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant encoder for encoding a list of ipv4 peers to buffers.\n\n```\nnpm install ipv4-peers\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/ipv4-peers.svg?style=flat)](http://travis-ci.org/mafintosh/ipv4-peers)\n\n## Usage\n\n``` js\nvar peers = require('ipv4-peers')\n\nvar buf = peers.encode([{\n  host: '127.0.0.1',\n  port: 8080\n}, {\n  host: '127.0.0.1',\n  port: 9090\n}])\n\nconsole.log(buf) // 12 byte buffer\nconsole.log(peers.decode(buf)) // the peer list\n```\n\n## API\n\n#### `var buf = peers.encode(peerList, [buffer], [offset])`\n\nEncode a list of ipv4 peers into a buffer.\n\n#### `var peers = peers.decode(buffer, [offset], [end])`\n\nDecode a buffer into a list of peers.\n\n#### `var length = peers.encodingLength(peerList)`\n\nReturns the amount of bytes needed to encode the peers into a buffer\n\n#### `peers = peers.idLength(idByteLength)`\n\nCreate a new ipv4-peers decoder that encodes/decodes a fixed size peer id in addition to host/port. The peer id is exposed as the `.id` property on a peer object.\n\n## License\n\nMIT\n","publish_time":1473085345001,"_cnpm_publish_time":1473085345001,"dist-tags":{"latest":"2.0.0"}}