Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from diasdavid/browser-tests
Browse files Browse the repository at this point in the history
Browser tests
  • Loading branch information
jbenet committed Nov 1, 2015
2 parents 113fedf + 360d222 commit 246bec0
Show file tree
Hide file tree
Showing 9 changed files with 2,181 additions and 183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
1 change: 1 addition & 0 deletions .zuul.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui: tape
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
js-multihash
============

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) ![](https://img.shields.io/badge/coverage-%3F-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/jbenet/multihashes.svg?style=flat-square)](https://david-dm.org/jbenet/multihashes) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

[multihash](//github.com/jbenet/multihash) implementation.

## Example
## Installation

### In Node.js through npm

```bash
$ npm install --save multihashes # node the name of the module is multihashes
```

```javascript
var multihashes = require('multihashes')
```

### In the Browser through browserify

Same as in Node.js, you just have to [browserify](https://github.com/substack/js-browserify) the code before serving it. See the browserify repo for how to do that.

### In the Browser through `<script>` tag

Make the [multihashes.min.js](/dist/multihashes.min.js) available through your server and load it using a normal `<script>` tag, this will export the `multihashes` constructor on the `window` object, such that:

```JavaScript
var multihashes = window.multihashes
```

#### Gotchas

You will need to use Node.js `Buffer` API compatible, if you are running inside the browser, you can access it by `multihash.Buffer` or you can install Feross's [Buffer](https://github.com/feross/buffer).

## Usage

```js
> var multihash = require('multihashes')
Expand Down
Loading

0 comments on commit 246bec0

Please sign in to comment.