# filter-values

> Filter an object values using glob patterns or with a `callback` function returns true.

Latest version **0.4.1** (published 2017-05-11) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2017-05-11 |
| First published | 2015-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Jon Schlinkert |
| Maintainers | doowb, jonschlinkert |
| Keywords | filter, find, glob, globbing, globs, key, keys, match, matcher, minimatch, obj, object, pattern, patterns, properties, property, props, regex, sort, test, wildcard |

## Links

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

## Dependencies (2)

- [for-own](https://npm.io/package/for-own.md) ^0.1.3
- [is-match](https://npm.io/package/is-match.md) ^0.4.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2017-05-11
- 0.4.0 — 2015-09-08
- 0.3.0 — 2015-07-13
- 0.2.0 — 2015-03-31
- 0.1.0 — 2015-01-20

## README

# filter-values [![NPM version](https://img.shields.io/npm/v/filter-values.svg?style=flat)](https://www.npmjs.com/package/filter-values) [![NPM monthly downloads](https://img.shields.io/npm/dm/filter-values.svg?style=flat)](https://npmjs.org/package/filter-values)  [![NPM total downloads](https://img.shields.io/npm/dt/filter-values.svg?style=flat)](https://npmjs.org/package/filter-values) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/filter-values.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/filter-values)

> Filter an object values using glob patterns or with a `callback` function returns true.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save filter-values
```

Install with [yarn](https://yarnpkg.com):

```sh
$ yarn add filter-values
```

## Usage

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

filter({a: 'a', b: 'b', c: 'c'}, function(value, key, obj) {
  return key !== 'b';
});
//=> {a: 'a', c: 'c'}

filter({a: 'a', b: 'b', c: 'c'}, function(value, key, obj) {
  return key === 'b';
});
//=> {b: 'b'}

filter({a: 'a', b: 'b', c: 'c'}, function(value, key, obj) {
  return value === 'b';
});
//=> {b: 'b'}

filter({a: 'a', b: 'bbd', c: 'bca2'}, ['b*', '!bc*'])
//=> {b: 'bbd'}

filter({a: 'a', b: 'bbd', c: 'bca2'}, '!b*')
//=> {a: 'a'}
```

## About

### Related projects

* [filter-object](https://www.npmjs.com/package/filter-object): Filter an object by its keys or values. Returns a copy of an object filtered… [more](https://github.com/jonschlinkert/filter-object) | [homepage](https://github.com/jonschlinkert/filter-object "Filter an object by its keys or values. Returns a copy of an object filtered to have only keys or values that match the given glob patterns.")
* [filter-values](https://www.npmjs.com/package/filter-values): Filter an object values using glob patterns or with a `callback` function returns true.  | [homepage](https://github.com/jonschlinkert/filter-values "Filter an object values using glob patterns or with a `callback` function returns true. ")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
* [rename-keys](https://www.npmjs.com/package/rename-keys): Modify the names of the own enumerable properties (keys) of an object. | [homepage](https://github.com/jonschlinkert/rename-keys "Modify the names of the own enumerable properties (keys) of an object.")
* [sort-object](https://www.npmjs.com/package/sort-object): Sort the keys in an object. | [homepage](https://github.com/doowb/sort-object "Sort the keys in an object.")

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** |  
| --- | --- |  
| 13 | [jonschlinkert](https://github.com/jonschlinkert) |  
| 5  | [tunnckoCore](https://github.com/tunnckoCore) |  
| 3  | [someone235](https://github.com/someone235) |  
| 1  | [doowb](https://github.com/doowb) |  

### Building docs

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

### Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

```sh
$ npm install && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

### License

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 11, 2017._

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