{"name":"ipv4-peers","version":"1.1.1","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":"ee15ecd007953b1148c883872e94b810a6cc28ba","_id":"ipv4-peers@1.1.1","_shasum":"85ab862a0f5214583e0518763f7e1d775ae24d76","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.4.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"85ab862a0f5214583e0518763f7e1d775ae24d76","tarball":"http://registry-npm.ywwl.com/ipv4-peers/download/ipv4-peers-1.1.1.tgz","integrity":"sha512-HtBxkuFMBUN4gVoktecf13xDLMS4rmHT0kD3iGjnvjpjHe/UGFng/RBI6CUiDb3617iiOsWQAaMM75jI/syV2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYeUIB3ZE/Zbxs+I4TiiQbcZ3yKXHdoZRySh1eGN4tNAiAICG9YjlERYI19o/My/okcbQycHosYLAJRPI+vTCdrTg=="}],"size":2575,"noattachment":false,"key":"/ipv4-peers/-/ipv4-peers-1.1.1.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ipv4-peers-1.1.1.tgz_1473174355053_0.7402010192163289"},"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":1473174355898,"_cnpm_publish_time":1473174355898,"dist-tags":{"latest":"2.0.0"}}