# array-filter

> Array#filter for older browsers.

Latest version **1.0.0** (published 2015-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-filter
pnpm add array-filter
yarn add array-filter
bun add array-filter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-18 |
| First published | 2013-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Julian Gruber |
| Maintainers | juliangruber |
| Keywords | array, filter, browser, html, browserify |

## Links

- npm: https://www.npmjs.com/package/array-filter
- Repository: https://github.com/juliangruber/array-filter
- Issues: https://github.com/juliangruber/array-filter/issues
- npm.io page: https://npm.io/package/array-filter

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-05-18
- 0.2.1 — 2015-05-18
- 0.2.0 — 2013-12-29
- 0.1.0 — 2013-12-29
- 0.0.1 — 2013-12-25
- 0.0.0 — 2013-05-22

## README

# array-filter

`Array#filter` for older browsers.

[![build status](https://secure.travis-ci.org/juliangruber/array-filter.png)](http://travis-ci.org/juliangruber/array-filter)
[![downloads](https://img.shields.io/npm/dm/array-filter.svg)](https://www.npmjs.org/package/array-filter)

[![testling badge](https://ci.testling.com/juliangruber/array-filter.png)](https://ci.testling.com/juliangruber/array-filter)

## Usage

```js
var filter = require('array-filter');

var array = [1, 2, 3];
console.log(filter(array, function (el, i, arr) {
  return false; // I throw it on the ground!
}));
// => []
```

## API

### filter(arr, fn[, self])

Return an array with elements of `arr` for which `fn` returns a truthy value. `fn` is called with

* `el`: The current element
* `i`: The element's index
* `arr`: The whole array

Optionally pass in `self` as the `this` value for `fn`.

## Installation

With [npm](http://npmjs.org) do

```bash
$ npm install array-filter
```

Then bundle for the browser with [browserify](https://github.com/substack/browserify).

## License

(MIT)

Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
_Source: https://npm.io/package/array-filter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
