1.3.1 • Published 5 years ago

joi-array-extensions v1.3.1

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

joi-array-extensions

Joi extensions for extra array rules.

npm download dependents travis appveyor

API

See the API Reference.

Usage

Usage is a two steps process. First, a schema is constructed using the provided types and constraints:

const BaseJoi = require('@hapi/joi')
const Extension = require('joi-array-extensions')
const Joi = BaseJoi.extend(Extension)

const schema = Joi.array().items({
    idx: Joi.number().integer()
}).continuous('idx', 1)

Coverage

7 tests complete
Test duration: 51 ms
Assertions count: 40 (verbosity: 5.71)
Leaks: No issues
Coverage: 100.00%
Lint: No issues
1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.3

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago