joi-array-extension

0.1.1 • Public • Published

joi-array-extension

Joi extensions for extra string rules.

npm version Build Status

Lead Maintainer: Kyle Laverty

Overview

This extention is focused on adding the ability to split strings into arrays so that they can be used with the rest of the joi ecosystem as if they were arrays.

Usage

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

const BaseJoi = require('joi');
const Extension = require('joi-array-extension');
const Joi = BaseJoi.extend(Extension);

const schema = Joi.array().separator(',').items(...);

API

See the API Reference.

Package Sidebar

Install

npm i joi-array-extension

Weekly Downloads

13

Version

0.1.1

License

BSD-3-Clause

Unpacked Size

5.68 kB

Total Files

5

Last publish

Collaborators

  • klaverty