1.0.1 • Published 3 years ago
isvalidatedarray v1.0.1
isValidatedArray
A simple array validation function that returns a boolean value.
Table of contents
Example
console.log(isValidatedArray([1,[2,3],'text']));Console:
trueInstallation
npm i isvalidatedarrayStart Plugin
import isValidatedArray from 'isvalidatedarray';
isValidatedArray(['element1']);Config
isValidatedArray(['element1'],{ allowEmptyArray: false, allowEmptyObject: false });The results of the package
isValidatedArray('string');
falseisValidatedArray(['element1']);
trueisValidatedArray([falsey values]);
falseisValidatedArray([{},[]],{ allowEmptyArray: true, allowEmptyObject: true });
true