🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

is-any-array

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-any-array

Check if a value is any kind of array

2.0.0
Source
npm
Version published
Weekly downloads
599K
-32.01%
Maintainers
4
Weekly downloads
 
Created

What is is-any-array?

The is-any-array npm package is a utility that helps determine if a given value is an array. It is particularly useful in scenarios where you need to validate input types or ensure that certain operations are performed on arrays.

What are is-any-array's main functionalities?

Basic Array Check

This feature allows you to check if a given value is an array. It returns true if the value is an array and false otherwise.

const isAnyArray = require('is-any-array');

console.log(isAnyArray([1, 2, 3])); // true
console.log(isAnyArray('not an array')); // false

Array-like Objects Check

This feature extends the basic array check to include array-like objects such as typed arrays. It helps in identifying more complex array structures.

const isAnyArray = require('is-any-array');

console.log(isAnyArray({ length: 0 })); // false
console.log(isAnyArray(new Int8Array(2))); // true

Other packages similar to is-any-array

FAQs

Package last updated on 28 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts