@0x/assert
Provides a standard way of performing type and schema validation across 0x projects
Last updated 3 months ago by xianny .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @0x/assert 
SYNC missed versions from official npm registry.

@0x/assert

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

Installation

yarn add @0x/assert

Usage

import { assert } from '@0x/assert';

assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);

If your project is in TypeScript, add the following to your tsconfig.json:

"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}

Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our contribution guidelines before getting started.

Install dependencies

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

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0x/assert yarn build

Or continuously rebuild on change:

PKG=@0x/assert yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

Current Tags

  • 3.0.9                                ...           latest (3 months ago)
  • 2.2.0-beta.3                                ...           protocolV3 (10 months ago)

42 Versions

  • 3.0.9                                ...           3 months ago
  • 3.0.8                                ...           3 months ago
  • 3.0.7                                ...           7 months ago
  • 3.0.6                                ...           8 months ago
  • 3.0.5                                ...           8 months ago
  • 3.0.4                                ...           8 months ago
  • 3.0.3                                ...           9 months ago
  • 3.0.2                                ...           9 months ago
  • 3.0.1                                ...           10 months ago
  • 3.0.0                                ...           10 months ago
  • 2.2.0-beta.3                                ...           10 months ago
  • 2.2.0-beta.2                                ...           10 months ago
  • 2.2.0-beta.1                                ...           a year ago
  • 2.2.0-beta.0                                ...           a year ago
  • 2.1.6                                ...           a year ago
  • 2.1.5                                ...           a year ago
  • 2.1.4                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.10                                ...           a year ago
  • 2.0.9                                ...           a year ago
  • 2.0.8                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.23                                ...           2 years ago
  • 1.0.22                                ...           2 years ago
  • 1.0.21                                ...           2 years ago
  • 1.0.20                                ...           2 years ago
  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |