joi-bigjs-extension
v2.2.2
Published
Joi Big.js extension
Downloads
10
Readme
joi-bigjs-extension
Joi extension for Big.js type
Installation
yarn add joi-bigjs-extension
Usage
JavaScript
const BaseJoi = require('@hapi/joi');
const {BigNumberExtension} = require('joi-bigjs-extension');
const Joi = BaseJoi.extend(BigNumberExtension);
const schema = Joi.bignumber().positive().integer().min(10).less(100);
Typescript
import * as BaseJoi from '@hapi/joi';
import {BigNumber} from 'bignumber.js';
import {BigNumberExtension} from 'joi-bigjs-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