# reduce-extract

> reduce-extract

Latest version **1.0.0** (published 2016-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install reduce-extract
pnpm add reduce-extract
yarn add reduce-extract
bun add reduce-extract
```

## 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 | 2016-02-25 |
| First published | 2016-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lloyd Brookes |
| Maintainers | 75lb |

## Links

- npm: https://www.npmjs.com/package/reduce-extract
- Repository: https://github.com/75lb/reduce-extract
- Homepage: https://github.com/75lb/reduce-extract#readme
- Issues: https://github.com/75lb/reduce-extract/issues
- npm.io page: https://npm.io/package/reduce-extract

## Dependencies (1)

- [test-value](https://npm.io/package/test-value.md) ^1.0.1

## Recent versions

- 1.0.0 (latest) — 2016-02-25

## README

[![view on npm](http://img.shields.io/npm/v/reduce-extract.svg)](https://www.npmjs.org/package/reduce-extract)
[![npm module downloads](http://img.shields.io/npm/dt/reduce-extract.svg)](https://www.npmjs.org/package/reduce-extract)
[![Build Status](https://travis-ci.org/75lb/reduce-extract.svg?branch=master)](https://travis-ci.org/75lb/reduce-extract)
[![Dependency Status](https://david-dm.org/75lb/reduce-extract.svg)](https://david-dm.org/75lb/reduce-extract)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

<a name="module_reduce-extract"></a>
## reduce-extract


<a name="exp_module_reduce-extract--extract"></a>
### extract(query) ⏏
Removes items from `array` which satisfy the query. Modifies the input array, returns the extracted.

**Kind**: Exported function  

| Param | Type    | Description                                                  |
| ----- | ------- | ------------------------------------------------------------ |
| query | `Array` | the input array, modified directly                           |
|       | `any`   | if an item in the input array passes this test it is removed |


**Example**
```js
> DJs = [
    { name: "Trevor", sacked: true },
    { name: "Mike", sacked: true },
    { name: "Chris", sacked: false },
    { name: "Alan", sacked: false }
]

> a.extract(DJs, { sacked: true })
[ { name: 'Trevor', sacked: true },
  { name: 'Mike', sacked: true } ]

> DJs
[ { name: 'Chris', sacked: false },
  { name: 'Alan', sacked: false } ]
```




* * *

&copy; 2016 Lloyd Brookes <75pound@gmail.com>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

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