|
3 | 3 | [](http://libp2p.io/)
|
4 | 4 | [](https://discuss.libp2p.io)
|
5 | 5 | [](https://codecov.io/gh/libp2p/js-libp2p-webtransport)
|
6 |
| -[](https://github.com/libp2p/js-libp2p-webtransport/actions/workflows/js-test-and-release.yml) |
| 6 | +[](https://github.com/libp2p/js-libp2p-webtransport/actions/workflows/js-test-and-release.yml?query=branch%3Amain) |
7 | 7 |
|
8 | 8 | > JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec
|
9 | 9 |
|
10 | 10 | ## Table of contents <!-- omit in toc -->
|
11 | 11 |
|
12 | 12 | - [Install](#install)
|
| 13 | + - [Browser `<script>` tag](#browser-script-tag) |
13 | 14 | - [Description](#description)
|
14 | 15 | - [Usage](#usage)
|
15 | 16 | - [Libp2p Usage Example](#libp2p-usage-example)
|
16 | 17 | - [API](#api)
|
17 | 18 | - [Transport](#transport)
|
18 | 19 | - [Connection](#connection)
|
| 20 | +- [API Docs](#api-docs) |
19 | 21 | - [License](#license)
|
20 |
| -- [Contribute](#contribute) |
| 22 | +- [Contribution](#contribution) |
21 | 23 |
|
22 | 24 | ## Install
|
23 | 25 |
|
24 | 26 | ```console
|
25 | 27 | $ npm i @libp2p/webtransport
|
26 | 28 | ```
|
27 | 29 |
|
| 30 | +### Browser `<script>` tag |
| 31 | + |
| 32 | +Loading this module through a script tag will make it's exports available as `Libp2pWebtransport` in the global namespace. |
| 33 | + |
| 34 | +```html |
| 35 | +<script src="https://unpkg.com/@libp2p/webtransport/dist/index.min.js"></script> |
| 36 | +``` |
| 37 | + |
28 | 38 | [](https://github.com/libp2p/interface-transport)
|
29 | 39 | [](https://github.com/libp2p/interface-connection)
|
30 | 40 |
|
@@ -67,13 +77,17 @@ For more information see [libp2p/js-libp2p/doc/CONFIGURATION.md#customizing-tran
|
67 | 77 |
|
68 | 78 | [](https://github.com/libp2p/interface-connection)
|
69 | 79 |
|
| 80 | +## API Docs |
| 81 | + |
| 82 | +- <https://libp2p.github.io/js-libp2p-webtransport> |
| 83 | + |
70 | 84 | ## License
|
71 | 85 |
|
72 | 86 | Licensed under either of
|
73 | 87 |
|
74 | 88 | - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
75 | 89 | - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
76 | 90 |
|
77 |
| -## Contribute |
| 91 | +## Contribution |
78 | 92 |
|
79 | 93 | Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
0 commit comments