UNPKG

760 BMarkdownView Raw
1# web3-utils
2
3This is a sub package of [web3.js][repo]
4
5This contains useful utility functions for Dapp developers.
6Please read the [documentation][docs] for more.
7
8## Installation
9
10### Node.js
11
12```bash
13npm install web3-utils
14```
15
16### In the Browser
17
18Build running the following in the [web3.js][repo] repository:
19
20```bash
21npm run-script build-all
22```
23
24Then include `dist/web3-utils.js` in your html file.
25This will expose the `Web3Utils` object on the window object.
26
27
28## Usage
29
30```js
31// in node.js
32var Web3Utils = require('web3-utils');
33console.log(Web3Utils);
34{
35 sha3: function(){},
36 soliditySha3: function(){},
37 isAddress: function(){},
38 ...
39}
40```
41
42
43[docs]: http://web3js.readthedocs.io/en/1.0/
44[repo]: https://github.com/ethereum/web3.js
45
46