joi-bignumber-extension
v1.1.3
Published
Joi BigNumber extension
Downloads
23
Readme
joi-bignumber-extension
Joi extension for BigNumber type
Lead Maintainer: Jaka Hudoklin
Installation
npm install --save joi-bignumber-extension
Usage
JavaScript
const BaseJoi = require('joi');
const {BigNumberExtension} = require('joi-bignumber-extension');
const Joi = BaseJoi.extend(BigNumberExtension);
const schema = Joi.bignumber().positive().integer().min(10).less(100);
Typescript
import * as BaseJoi from 'joi';
import {BigNumber} from 'bignumber.js';
import {BigNumberExtension} from 'joi-bignumber-extension';
const Joi = BaseJoi.extend(BigNumberExtension);
const schema = Joi.bignumber().positive().integer().min(10).less(100);
API
See the API Reference.
Development
Install dependencies
npm install
Running tests
npm test
Release
npm run release patch/minor/major
License
MIT