isvalidatedarray
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i isvalidatedarray

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.63 kB

Total Files

5

Last publish

Collaborators

  • antonpluginscreator