# matching

> Find list items by example

Latest version **1.0.0** (published 2014-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install matching
pnpm add matching
yarn add matching
bun add matching
```

## 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 | 2014-06-03 |
| First published | 2014-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Felix Gnass |
| Maintainers | fgnass |
| Keywords | where |

## Links

- npm: https://www.npmjs.com/package/matching
- Repository: https://github.com/fgnass/matching
- Issues: https://github.com/fgnass/matching/issues
- npm.io page: https://npm.io/package/matching

## Recent versions

- 1.0.0 (latest) — 2014-06-03

## README

[![Build Status](https://travis-ci.org/fgnass/matching.svg?branch=master)](https://travis-ci.org/fgnass/matching)

### Tiny utility to filter lists by example

Example:

```js
var matching = require('matching');

var list = [
  { type: 'foo', foo: 23 },
  { type: 'foo', foo: 42 },
  { type: 'bar', bar: 23 }
];

var foo = matching({ type: 'foo' }, list);
// => [ { type: 'foo', foo: 23 }, { type: 'foo', foo: 42 } ]
```

### About

This package has been written to accompany tools like
[flatten](https://npmjs.org/package/flatten),
[uniqs](https://npmjs.org/package/uniqs) or
[intersect](https://www.npmjs.org/package/intersect) as simple and lightweight
alternative to utility collections like underscore or lodash where you
could achieve the same result like this:

```js
_.where(list, {type: 'foo'});
```

The order of the arguments has been reveresed to allow
[currying](https://www.npmjs.org/package/curry).

### License

MIT

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