check0arr
v1.0.2
Published
It checks whether an array is empty
Downloads
194
Maintainers
Readme
check0Arr
Description
check0Arr
is a simple utility that checks whether an array is empty. It returns true
if the array is empty and false
otherwise. It also validates the input to ensure it is an array.
If the Array isn't an array, it returns 0
Installation
You can install check0Arr
via npm:
npm install check0arr
Usage
An example about the usage:
const check0Arr = require('check0arr');
console.log(check0Arr([])); // true
console.log(check0Arr([1, 2, 3])); // false
console.log(check0Arr(null)); // false
console.log(check0Arr(1)); // false
console.log(check0Arr({})); // false
console.log(check0Arr('')); // false
LICENSE
The MIT Open Source License is used for this.