1.0.1 • Published 2 years ago

isvalidatedarray v1.0.1

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

isValidatedArray

npm-version repo-size downloads license

A simple array validation function that returns a boolean value.

Table of contents

Example

console.log(isValidatedArray([1,[2,3],'text']));

Console:

true

Installation

npm i isvalidatedarray

Start Plugin

import isValidatedArray from 'isvalidatedarray';

isValidatedArray(['element1']);

Config

isValidatedArray(['element1'],{ allowEmptyArray: false, allowEmptyObject: false });

The results of the package

isValidatedArray('string');
false
isValidatedArray(['element1']);
true
isValidatedArray([falsey values]);
false
isValidatedArray([{},[]],{ allowEmptyArray: true, allowEmptyObject: true });
true

License

Licensed under MIT