|
1 | 1 | # is-ipfs <!-- omit in toc -->
|
2 | 2 |
|
3 | 3 | [](https://codecov.io/gh/ipfs-shipyard/is-ipfs)
|
4 |
| -[](https://github.com/ipfs-shipyard/is-ipfs/actions/workflows/js-test-and-release.yml) |
| 4 | +[](https://github.com/ipfs-shipyard/is-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) |
5 | 5 |
|
6 | 6 | > A set of utilities to help identify IPFS resources on the web
|
7 | 7 |
|
8 | 8 | ## Table of contents <!-- omit in toc -->
|
9 | 9 |
|
10 | 10 | - [Install](#install)
|
| 11 | + - [Browser `<script>` tag](#browser-script-tag) |
11 | 12 | - [Usage](#usage)
|
12 | 13 | - [API](#api)
|
13 | 14 | - [Content Identifiers](#content-identifiers)
|
|
31 | 32 | - [Multiaddrs](#multiaddrs)
|
32 | 33 | - [`isIPFS.multiaddr(addr)`](#isipfsmultiaddraddr)
|
33 | 34 | - [`isIPFS.peerMultiaddr(addr)`](#isipfspeermultiaddraddr)
|
| 35 | +- [API Docs](#api-docs) |
34 | 36 | - [License](#license)
|
35 |
| -- [Contribute](#contribute) |
| 37 | +- [Contribution](#contribution) |
36 | 38 |
|
37 | 39 | ## Install
|
38 | 40 |
|
39 | 41 | ```console
|
40 | 42 | $ npm i is-ipfs
|
41 | 43 | ```
|
42 | 44 |
|
| 45 | +### Browser `<script>` tag |
| 46 | + |
| 47 | +Loading this module through a script tag will make it's exports available as `IsIpfs` in the global namespace. |
| 48 | + |
| 49 | +```html |
| 50 | +<script src="https://unpkg.com/is-ipfs/dist/index.min.js"></script> |
| 51 | +``` |
| 52 | + |
43 | 53 | ## Usage
|
44 | 54 |
|
45 | 55 | ```javascript
|
@@ -224,13 +234,17 @@ Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multif
|
224 | 234 |
|
225 | 235 | Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Uint8Array` represents a valid libp2p peer multiaddr (matching [`P2P` format from `mafmt`](https://github.com/multiformats/js-mafmt#api)) or `false` otherwise.
|
226 | 236 |
|
| 237 | +## API Docs |
| 238 | + |
| 239 | +- <https://ipfs-shipyard.github.io/is-ipfs> |
| 240 | + |
227 | 241 | ## License
|
228 | 242 |
|
229 | 243 | Licensed under either of
|
230 | 244 |
|
231 | 245 | - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
232 | 246 | - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
233 | 247 |
|
234 |
| -## Contribute |
| 248 | +## Contribution |
235 | 249 |
|
236 | 250 | 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