Skip to content

Commit 45dc630

Browse files
RichardLittdaviddias
authored andcommitted
Standardized Readme
See multiformats/multiformats#13
1 parent 4222846 commit 45dc630

File tree

2 files changed

+95
-42
lines changed

2 files changed

+95
-42
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Protocol Labs Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+74-42
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,38 @@ js-multiaddr
22
============
33

44
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
5-
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
5+
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](http://github.com/multiformats/multiformats)
66
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
77
[![Coverage Status](https://coveralls.io/repos/github/jbenet/js-multiaddr/badge.svg?branch=master)](https://coveralls.io/github/jbenet/js-multiaddr?branch=master)
88
[![Travis CI](https://travis-ci.org/jbenet/js-multiaddr.svg?branch=master)](https://travis-ci.org/jbenet/js-multiaddr)
99
[![Circle CI](https://circleci.com/gh/jbenet/js-multiaddr.svg?style=svg)](https://circleci.com/gh/jbenet/js-multiaddr)
1010
[![Dependency Status](https://david-dm.org/jbenet/js-multiaddr.svg?style=flat-square)](https://david-dm.org/jbenet/js-multiaddr) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
1111

12-
> JavaScript implementation of [multiaddr](https://github.com/jbenet/multiaddr).
12+
> JavaScript implementation of [multiaddr](https://github.com/multiformats/multiaddr).
1313
14-
## What is multiaddr?
14+
## Table of Contents
15+
16+
- [Background](#background)
17+
- [What is multiaddr?](#what-is-multiaddr)
18+
- [Install](#install)
19+
- [Setup](#setup)
20+
- [Node.js](#nodejs)
21+
- [Browser: Browserify, Webpack, other bundlers](#browser-browserify-webpack-other-bundlers)
22+
- [Browser: `<script>` Tag](#browser-script-tag)
23+
- [Usage](#usage)
24+
- [API](#api)
25+
- [Create](#create)
26+
- [Protocols](#protocols)
27+
- [Node-Friendly Addresses](#node-friendly-addresses)
28+
- [En/decapsulate](#endecapsulate)
29+
- [Tunneling](#tunneling)
30+
- [Maintainers](#maintainers)
31+
- [Contribute](#contribute)
32+
- [License](#license)
33+
34+
## Background
35+
36+
### What is multiaddr?
1537

1638
A standard way to represent addresses that
1739

@@ -21,7 +43,47 @@ A standard way to represent addresses that
2143
- have a nice string representation
2244
- encapsulate well
2345

24-
## Example
46+
## Install
47+
48+
```sh
49+
npm i multiaddr
50+
```
51+
52+
### Setup
53+
54+
#### Node.js
55+
56+
```js
57+
const multiaddr = require('multiaddr')
58+
```
59+
60+
#### Browser: Browserify, Webpack, other bundlers
61+
62+
The code published to npm that gets loaded on require is in fact a ES5
63+
transpiled version with the right shims added. This means that you can require
64+
it and use with your favourite bundler without having to adjust asset management
65+
process.
66+
67+
```js
68+
const multiaddr = require('multiaddr')
69+
```
70+
71+
#### Browser: `<script>` Tag
72+
73+
Loading this module through a script tag will make the `Multiaddr` obj available in
74+
the global namespace.
75+
76+
```html
77+
<script src="https://npmcdn.com/multiaddr/dist/index.min.js"></script>
78+
<!-- OR -->
79+
<script src="https://npmcdn.com/multiaddr/dist/index.js"></script>
80+
```
81+
82+
**NOTE**: You will need access to the Node.js `Buffer` API. If you are running
83+
in the browser, you can access it with `multiaddr.Buffer` or you can install
84+
[feross/buffer](https://github.com/feross/buffer).
85+
86+
## Usage
2587

2688
```js
2789
$ node
@@ -197,48 +259,18 @@ const printerOverProxy = proxy.encapsulate(printer)
197259

198260
Returns `true` if the passed in `addr` is a valid `multiaddr`.
199261

200-
## Installation
262+
## Maintainers
201263

202-
### npm
264+
Captain: [@diasdavid](https://github.com/diasdavid).
203265

204-
```sh
205-
> npm i multiaddr
206-
```
266+
## Contribute
207267

208-
## Setup
268+
Contributions welcome. Please check out [the issues](https://github.com/multiformats/js-multiaddr/issues).
209269

210-
### Node.js
270+
Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
211271

212-
```js
213-
const multiaddr = require('multiaddr')
214-
```
215-
216-
### Browser: Browserify, Webpack, other bundlers
217-
218-
The code published to npm that gets loaded on require is in fact a ES5
219-
transpiled version with the right shims added. This means that you can require
220-
it and use with your favourite bundler without having to adjust asset management
221-
process.
222-
223-
```js
224-
const multiaddr = require('multiaddr')
225-
```
226-
227-
### Browser: `<script>` Tag
228-
229-
Loading this module through a script tag will make the `Multiaddr` obj available in
230-
the global namespace.
231-
232-
```html
233-
<script src="https://npmcdn.com/multiaddr/dist/index.min.js"></script>
234-
<!-- OR -->
235-
<script src="https://npmcdn.com/multiaddr/dist/index.js"></script>
236-
```
237-
238-
**NOTE**: You will need access to the Node.js `Buffer` API. If you are running
239-
in the browser, you can access it with `multiaddr.Buffer` or you can install
240-
[feross/buffer](https://github.com/feross/buffer).
272+
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
241273

242-
# License
274+
## License
243275

244-
MIT
276+
[MIT](LICENSE) © Protocol Labs Inc.

0 commit comments

Comments
 (0)