{"name":"libp2p-spdy","version":"0.13.1","description":"SPDY 3.1 implementation wrapper that is compatible with libp2p Stream Muxer expected interface","leadMaintainer":"Jacob Heun <jacobheun@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","release":"aegir release","release-minor":"aegir release --type minor","release-major":"aegir release --type major","coverage":"aegir coverage","coverage-publish":"aegir-coverage publish"},"pre-push":["lint"],"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-spdy.git"},"keywords":["IPFS"],"license":"MIT","bugs":{"url":"https://github.com/libp2p/js-libp2p-spdy/issues"},"homepage":"https://github.com/libp2p/js-libp2p-spdy","engines":{"node":">=6.0.0","npm":">=3.0.0"},"devDependencies":{"aegir":"^17.1.1","chai":"^4.2.0","chai-checkmark":"^1.0.1","dirty-chai":"^2.0.1","interface-stream-muxer":"~0.6.0","libp2p-tcp":"~0.13.0","libp2p-websockets":"~0.12.0","multiaddr":"^6.0.0","pull-file":"^1.1.0","pull-pair":"^1.1.0","run-parallel":"^1.1.9","sinon":"^7.1.0","tap-spec":"^4.1.1","tape":"^4.9.0"},"dependencies":{"debug":"^4.1.0","interface-connection":"~0.3.3","pull-catch":"^1.0.0","pull-stream":"^3.6.9","pull-stream-to-stream":"^1.3.4","spdy-transport":"^3.0.0","stream-to-pull-stream":"^1.7.2"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"Jacob Heun","email":"jake@andyet.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"greenkeeperio-bot","email":"support@greenkeeper.io"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"npmcdn-to-unpkg-bot","email":"npmcdn-to-unpkg-bot@users.noreply.github.com"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"}],"gitHead":"0f87e6ebc5ee7aeae21db142d974d95999e8b2fb","_id":"libp2p-spdy@0.13.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"dist":{"integrity":"sha512-yey0kL797f4nBeUB5Js3jgiVnty9UJ6OKpzuMcD8Cv9j3AbIf3ES0RVsCTGcsok1h6mRCzKiYtKQa1UnsriRLw==","shasum":"2d96cadfa8abb7f591a7fda2ded2cc365f097e08","tarball":"http://registry-npm.ywwl.com/libp2p-spdy/download/libp2p-spdy-0.13.1.tgz","fileCount":7,"unpackedSize":15597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBqZQCRA9TVsSAnZWagAAJhcP/05YQ1VuAj4zW5Wzm7o2\n3Lj8xA1exHKCGvX/Eg5WiFbSJ17BvseqCkLOlFdb3aACKSMdTt4+QmYda/Ca\n4/IBZDDxPr7G8Rq9sXn85cdAS5YF8tIaU2a4G86ISbk0BvSLkguLF8iF7r8f\nU5/75kwjVITEtx/q2Uzcp6jCQmhSu015ooZw5tkjR5NxSb0IIXjjQ3hBTHff\nAySC4+ilFcd9pBfTG3qy5LtM85p66vvlci1Zjk7PkYgAu1sh1rplmYxr9UN+\nNKTCkwn6veKBfIMXyr0cT95u5MWGon+JaAqjB4Hg/wKAxwToXjIiqRBzZqFW\nCkTqmagRA9Ihh+udyW8B+ELnkxvXO8ZjArgFSJXwT5VSHKyRlLiL+m8j3SoA\nk+QRI53TQK7CGwEZRu1+nit+tVcX3/gsF3ZxSbnuJELUdcvFq7T/baa8MuZp\nmbpO+FlnAMpCCal3oNjFOqB5hQo+6rGhb6nO4cnyEK3XevUS/UOOuYpPLMBf\nm9y5N3lvsa5UVDZJae78TQmZwvQ3bMTZg1eSiGgQxVLeg+VNLb/ohLSj3cAB\nMS01hbh5kG2Fbg40yDA4PK0YgsNMytXk2L/h3FFUzDYxMYsnw/wvNgzTkZTM\nt773fJFJ8vwvkhweqkW4vU60uKAWbzGPWPd4Wt52X9sGi+A+OwPcpI936nmW\nhVV5\r\n=XtGF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrXByAjO4iECsonouYSUAPIUbU9bjOCDIR96N+A7LVoQIgFWN9k2g2hT66/YEJ2DWwnIc1BN1ETRBUeJ3CKuFgURM="}],"size":5367,"noattachment":false,"key":"/libp2p-spdy/-/libp2p-spdy-0.13.1.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-spdy_0.13.1_1543939663516_0.5489824477104945"},"_hasShrinkwrap":false,"deprecated":"No longer maintained, please use libp2p-mplex instead","readme":"js-libp2p-spdy\n==============\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-spdy/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-spdy?branch=master)\n[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-spdy.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-spdy)\n[![Travis CI](https://travis-ci.org/libp2p/js-libp2p-spdy.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-spdy)\n[![Circle CI](https://circleci.com/gh/libp2p/js-libp2p-spdy.svg?style=svg)](https://circleci.com/gh/libp2p/js-libp2p-spdy)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Node.js-%3E%3D6.0.0-orange.svg?style=flat-square)\n\n> SPDY 3.1 implementation wrapper that is compatible with libp2p Stream Muxer expected interface\n\n[![](https://github.com/libp2p/interface-stream-muxer/raw/master/img/badge.png)](https://github.com/libp2p/interface-stream-muxer)\n\n## Lead Maintainer\n\n[Jacob Heun](https://github/jacobheun)\n\n## Installation\n\n### npm\n\n```sh\n> npm i libp2p-spdy\n```\n\n### Use in Node.js\n\n```js\nconst spdy = require('libp2p-spdy')\n```\n\n### Use in a browser with browserify, webpack or any other bundler\n\nThe code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.\n\n```JavaScript\nvar spdy = require('libp2p-spdy')\n```\n\n### Use in a browser Using a script tag\n\nLoading this module through a script tag will make the `Lip2pSpdy` obj available in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/libp2p-spdy/dist/index.min.js\"></script>\n<!-- OR -->\n<script src=\"https://unpkg.com/libp2p-spdy/dist/index.js\"></script>\n```\n\n## Usage\n\n### API\n\n#### Attaching it to a socket (duplex stream)\n\n**As a listener**\n\n```JavaScript\nconst listener = spdy(conn, true)\n```\n\n**As a dialer**\n\n```JavaScript\nconst dialer = spdy(conn, false)\n```\n\n#### Opening a multiplex duplex stream\n\n```JavaScript\nconst conn = dialer.newStream((err, conn) => {})\n\nconn.on('error', (err) => {})\n```\n\nnote: Works the same on the listener side\n\n#### Receiving incoming stream\n\n```JavaScript\ndialer.on('stream', (conn) => {})\n```\n\nnote: Works the same on the listener side\n\n#### Close\n\n```JavaScript\ndialer.close()\n```\n\nnote: Works the same on the listener side\n\n#### Other events\n\n```JavaScript\ndialer.on('close', () => {})\ndialer.on('error', () => {})\n```\n\nnote: Works the same on the listener side\n\n### This module uses `pull-streams`\n\nWe expose a streaming interface based on `pull-streams`, rather then on the Node.js core streams implementation (aka Node.js streams). `pull-streams` offers us a better mechanism for error handling and flow control guarantees. If you would like to know more about why we did this, see the discussion at this [issue](https://github.com/ipfs/js-ipfs/issues/362).\n\nYou can learn more about pull-streams at:\n\n- [The history of Node.js streams, nodebp April 2014](https://www.youtube.com/watch?v=g5ewQEuXjsQ)\n- [The history of streams, 2016](http://dominictarr.com/post/145135293917/history-of-streams)\n- [pull-streams, the simple streaming primitive](http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple)\n- [pull-streams documentation](https://pull-stream.github.io/)\n\n#### Converting `pull-streams` to Node.js Streams\n\nIf you are a Node.js streams user, you can convert a pull-stream to a Node.js stream using the module [`pull-stream-to-stream`](https://github.com/pull-stream/pull-stream-to-stream), giving you an instance of a Node.js stream that is linked to the pull-stream. For example:\n\n```js\nconst pullToStream = require('pull-stream-to-stream')\n\nconst nodeStreamInstance = pullToStream(pullStreamInstance)\n// nodeStreamInstance is an instance of a Node.js Stream\n```\n\nTo learn more about this utility, visit https://pull-stream.github.io/#pull-stream-to-stream.\n\n\n","publish_time":1543939663657,"_cnpm_publish_time":1543939663657,"dist-tags":{"latest":"0.13.3"}}