|
3 | 3 | [](http://libp2p.io/)
|
4 | 4 | [](https://discuss.libp2p.io)
|
5 | 5 | [](https://codecov.io/gh/libp2p/js-libp2p-floodsub)
|
6 |
| -[](https://github.com/libp2p/js-libp2p-floodsub/actions/workflows/js-test-and-release.yml) |
| 6 | +[](https://github.com/libp2p/js-libp2p-floodsub/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) |
7 | 7 |
|
8 | 8 | > libp2p-floodsub, also known as pubsub-flood or just dumbsub, this implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network).
|
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 | - [Don't use this module](#dont-use-this-module)
|
14 | 15 | - [Usage](#usage)
|
15 | 16 | - [License](#license)
|
16 |
| -- [Contribute](#contribute) |
| 17 | +- [Contribution](#contribution) |
17 | 18 |
|
18 | 19 | ## Install
|
19 | 20 |
|
20 | 21 | ```console
|
21 | 22 | $ npm i @libp2p/floodsub
|
22 | 23 | ```
|
23 | 24 |
|
| 25 | +### Browser `<script>` tag |
| 26 | + |
| 27 | +Loading this module through a script tag will make it's exports available as `Libp2pFloodsub` in the global namespace. |
| 28 | + |
| 29 | +```html |
| 30 | +<script src="https://unpkg.com/@libp2p/floodsub/dist/index.min.js"></script> |
| 31 | +``` |
| 32 | + |
24 | 33 | ## Don't use this module
|
25 | 34 |
|
26 | 35 | This module is a naive implementation of pubsub. It broadcasts all messages to all network peers, cannot provide older messages and has no protection against bad actors.
|
@@ -56,6 +65,6 @@ Licensed under either of
|
56 | 65 | - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
57 | 66 | - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
58 | 67 |
|
59 |
| -## Contribute |
| 68 | +## Contribution |
60 | 69 |
|
61 | 70 | 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