isarray
npmv2.0.5Array#isArray for older browsers
Not recommended for new projects
No — isarray should not be adopted for new projects. Last published 2620 days ago.
- AAdoption: grade A, Excellent.
174.9M downloads per week and 3 known dependents.
- FMaintenance: grade F, Failing.
Last published 2620 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 3.3 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding isarray to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the isarray README.
var isArray = require('isarray');
console.log(isArray([])); // => true
console.log(isArray({})); // => falseisarray vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| isarraythis page | 174.9M | 3 | MIT | 7 years ago |
| p-locate | 216.9M | 1 | MIT | 1 day ago |
| open | 130.4M | 4 | MIT | 1 day ago |
| axios | 106.5M | 4 | MIT | 1 day ago |
| fflate | 53.5M | 1 | MIT | 1 day ago |
| default-browser | 52.6M | 1 | MIT | 1 day ago |
Dependencies
Declared by isarray v2.0.5. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (1)
Used by
Popular packages that depend on isarray.
Relationship graph
Dependencies (left) and dependents (right) of isarray.
Frequently installed together
An AST-based pattern checker for JavaScript.
Robustly `.call.bind()` a function
Is this an arguments object? It's a harder question than you think.
Get and robustly cache all JS language-level intrinsics at first require time
Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag
Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.
ES2015-compliant shim for Object.is - differentiates between -0 and +0
Is this value a JS SharedArrayBuffer?
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Store information about any JS value in a side channel. Uses WeakMap if available.
Does this JS environment support the `name` property on functions?
Release history
No releases in the last two years, typically about 287 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.0.5latest | 7 years ago | 3.3 KB | MIT |
| 2.0.4 | 8 years ago | 3.4 KB | MIT |
| 2.0.3 | 8 years ago | 3.3 KB | MIT |
| 2.0.2 | 9 years ago | — | MIT |
| 2.0.1 | 10 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.0.0 | 10 years ago | — | MIT |
| 0.0.1 | 13 years ago | — | MIT |
| 0.0.0 | 13 years ago | — | MIT |
Overview
isarray is an npm package that array#isArray for older browsers. It is extremely widely used, with about 174.9M downloads per week and 3 known dependents in the graph. The latest version is 2.0.5, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need array#isArray for older browsers and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (174.9M weekly downloads).
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use isarray?
No — isarray should not be adopted for new projects. Last published 2620 days ago.
How do I install isarray?
Run `npm install isarray` to add isarray to your npm project.
What license is isarray released under?
isarray is distributed under the MIT license.
How popular is isarray?
isarray has approximately 174,862,265 downloads per week and 3 known dependent packages.
Is isarray still maintained?
The most recent release of isarray (v2.0.5) was published 7 years ago.
Does isarray run install scripts?
No. isarray does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.