0.2.2 • Published 6 years ago

avali v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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.

ruledescription
anyany type
strstring
numnumber
boolboolean
funcfunction
arrarray
errerror
nilnull
undefundefined
objobject
argsarguments

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

args

Type: arguments or array

License

MIT © Timofey Dergachev

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago