@dileepfrogorg/web3-utils
v1.0.0-beta.52
Published
Collection of utility functions used in web3.js.
Downloads
4
Readme
web3-utils
This is a sub package of web3.js
This contains useful utility functions for Dapp developers.
Please read the documentation for more.
Installation
npm install web3-utils
Usage
Import all of the utils functions
import * as Utils from 'web3-utils';
console.log(Utils);
> {
sha3: Function,
soliditySha3: Function,
isAddress: Function,
...
}
Import what you need
import { asciiToHex } from 'web3-utils';
console.log(asciiToHex('I have 100!'));
> "0x49206861766520313030e282ac"
Types
All the typescript typings are placed in the types folder.