# only-object

> filter object tool

Latest version **1.0.6** (published 2018-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install only-object
pnpm add only-object
yarn add only-object
bun add only-object
```

## 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.6 |
| Published | 2018-11-05 |
| First published | 2018-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | mayness |
| Maintainers | mayness |
| Keywords | only, object, only-object |

## Links

- npm: https://www.npmjs.com/package/only-object
- Repository: https://github.com/Mayness/only-object
- Homepage: https://github.com/Mayness/only-object#readme
- Issues: https://github.com/Mayness/only-object/issues
- npm.io page: https://npm.io/package/only-object

## Recent versions

- 1.0.6 (latest) — 2018-11-05
- 1.0.5 — 2018-11-05
- 1.0.4 — 2018-11-05
- 1.0.3 — 2018-11-05
- 1.0.2 — 2018-11-02
- 1.0.0 — 2018-11-02

## README

# only-object

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]

[npm-image]: https://img.shields.io/npm/v/only-object.svg?style=flat-square
[npm-url]: https://npmjs.org/package/only-object
[travis-image]: https://img.shields.io/travis/Mayness/only-object.svg
[travis-url]: https://travis-ci.org/Mayness/only-object
[codecov-image]: https://img.shields.io/codecov/c/github/Mayness/only-object.svg?style=flat-square
[codecov-url]: https://codecov.io/github/Mayness/only-object?branch=master

filter object tool

## Usage

```
const onlyObject = require('only-object');
const obj = {
  a: 1,
  b: '2',
  c: 3,
};
const filter = onlyObject.filter(obj, [ 'a', 'c' ]);
const reduce = onlyObject.reduce(obj, [ 'a', 'c' ]);
```

filter yields:
```
{
  a: 1,
  c: 3,
}
```


reduce yields:
```
{
  b: '2',
}
```

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