is-positive-array
Checks whether a value is an array with more than zero items
Install
$ npm install --save is-positive-array
or
$ yarn add is-positive-array
API
isPositiveArray(incomingValue: unknown): boolean
incomingValue
Type: unknown
Usage
import
import isPositiveArray from 'is-positive-array';
// or
var isPositiveArray = require('is-positive-array');
positive array
import isPositiveArray from 'is-positive-array';
const result = isPositiveArray([1, 2, 3]);
console.log(result);
// true
empty array
import isPositiveArray from 'is-positive-array';
const result = isPositiveArray([]);
console.log(result);
// false
incorrect value
import isPositiveArray from 'is-positive-array';
const result = isPositiveArray(undefined);
console.log(result);
// false
License
MIT © Kas Elvirov