isValidatedArray
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