This package has been deprecated

Author message:

THIS PACKAGE IS NO LONGER MAINTAINED

avali

0.2.2 • Public • Published

avali

Build Status Coverage Status Dependency Status

Arguments validation

THIS PACKAGE IS NO LONGER MAINTAINED

Install

$ npm install --save avali

Usage

const avali = require('avali');

function something(a, b) {
  avali(['str', 'arr, undef'], arguments);
  // ...
}

API

avali(rules, args)

rules

Type: array

Each argument is an array element, which is a string with the valid types listed, separated by commas.

rule description
any any type
str string
num number
bool boolean
func function
arr array
err error
nil null
undef undefined
obj object
args arguments

If necessary, set the optional parameter, use undef in together with other types.

args

Type: arguments or array

License

MIT © Timofey Dergachev

Readme

Keywords

Package Sidebar

Install

npm i avali

Weekly Downloads

1

Version

0.2.2

License

MIT

Unpacked Size

17.6 kB

Total Files

8

Last publish

Collaborators

  • exeto-archive