# object-filter

> `Array.prototype.filter` for objects

Latest version **1.0.2** (published 2013-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install object-filter
pnpm add object-filter
yarn add object-filter
bun add object-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.2 |
| Published | 2013-11-29 |
| First published | 2013-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Maciej Małecki |
| Maintainers | mmalecki |
| Keywords | object, filter |

## Links

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

## Recent versions

- 1.0.2 (latest) — 2013-11-29

## README

# objfilter
[![Build Status](https://travis-ci.org/mmalecki/objfilter.png?branch=master)](https://travis-ci.org/mmalecki/objfilter)

`Array.prototype.filter` for objects.

## Usage

```js
var assert = require('assert');
var objfilter = require('../');

var o1 = {
  a: 1,
  b: -1,
  c: 0,
  d: 42
};

objfilter(o1, function (n) {
  return n > 0;
}); // => `{ a: 1, d: 42 }`
```

## API

### `objfilter(obj, iterator, this)`

* `obj` (`object`) - object to filter on
* `iterator` (`function`, required) - iterator function
* `this` (optional) - `this` for `iterator`

Creates a new object with all the elements that pass the test implemented by
`iterator`.

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