aboutsummaryrefslogblamecommitdiffstats
path: root/packages/assert/README.md
blob: 1ea6acfb57799824cab1769ad83553b6bc3c5594 (plain) (tree)
1
2
3
4
5
6
7
8
9
                    
 
                                                                                  
 
               

       
                          
   
 







                                                                                                               

        
             
                                           


                                                               


               
                                                                                                                                                                                                     
 
                                                                                        
 
                        
 
                                                                      
 


                                            

                         
 


            
 
         
 


          
 
        
 


         
 
             
 


         
## @0xproject/assert

Standard type and schema assertions to be used across all 0x projects and packages

## Installation

```bash
yarn add @0xproject/assert
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```
"include": [
    "./node_modules/web3-typescript-typings/index.d.ts",
]
```

## Usage

```typescript
import { assert } from '@0xproject/assert';

assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```

## Contributing

We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install Dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

```bash
yarn build
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```