Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliangruber/isarray
Array#isArray for older browsers.
https://github.com/juliangruber/isarray
Last synced: 3 days ago
JSON representation
Array#isArray for older browsers.
- Host: GitHub
- URL: https://github.com/juliangruber/isarray
- Owner: juliangruber
- License: mit
- Created: 2013-05-22T19:09:36.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T07:17:44.000Z (3 months ago)
- Last Synced: 2025-01-02T10:04:34.555Z (10 days ago)
- Language: JavaScript
- Size: 255 KB
- Stars: 132
- Watchers: 11
- Forks: 41
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-ponyfills - isarray - [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) (Arrays)
README
# isarray
`Array#isArray` for older browsers and deprecated Node.js versions.
[![github actions][actions-image]][actions-url]
[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
[![openssf](https://api.securityscorecards.dev/projects/github.com/juliangruber/isarray/badge)](https://deps.dev/npm/isarray)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/6288/badge)](https://www.bestpractices.dev/projects/6288)__Just use Array.isArray directly__, unless you need to support those older versions.
## Usage
```js
var isArray = require('isarray');console.log(isArray([])); // => true
console.log(isArray({})); // => false
```## API
[Array#isArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)
## Installation
With [npm](https://npmjs.org) do
```bash
$ npm install isarray
```Then bundle for the browser with
[browserify](https://github.com/substack/node-browserify).## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/juliangruber/isarray
[actions-url]: https://github.com/juliangruber/isarray/actions