Package Exports
- ipfs-bitswap
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ipfs-bitswap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ipfs-bitswap
Node.js implementation of the Bitswap 'data exchange' protocol used by IPFS
Installation
npm
> npm i ipfs-bitswap
Use in Node.js
const bitswap = require('ipfs-bitswap')
Use in a browser with browserify, webpack or any other bundler
The 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.
const bitswap = require('ipfs-bitswap')
Use in a browser using a script tag
Loading this module through a script tag will make the IpfsBitswap
object available in the global namespace.
<script src="https://npmcdn.com/ipfs-bitswap/dist/index.min.js"></script>
<!-- OR -->
<script src="https://npmcdn.com/ipfs-bitswap/dist/index.js"></script>
For the documentation see API.md.