# @f/reduce-obj

> Reduce over an object&#x27;s key-value pairs

Latest version **1.0.0** (published 2016-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/reduce-obj
pnpm add @f/reduce-obj
yarn add @f/reduce-obj
bun add @f/reduce-obj
```

## 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-01-08 |
| First published | 2016-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/reduce-obj
- Repository: https://github.com/micro-js/reduce-obj
- Issues: https://github.com/micro-js/reduce-obj/issues
- npm.io page: https://npm.io/package/@f/reduce-obj

## Recent versions

- 1.0.0 (latest) — 2016-01-08

## README

# reduce-obj

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Reduce over an object&#x27;s key-value pairs

## Installation

    $ npm install @f/reduce-obj

## Usage

```js
var reduce = require('@f/reduce-obj')
var fruits = {apples: 2, oranges: 3}
var numFruits = reduce(sum, 0, fruits)

function sum (a, b) {
  return a + b
}
```

## API

### reduce(cb, initialValue, obj)

- `cb` - Callback called for each key/value pair in `obj` with an accumlator value and the current item.

```js
function cb (acc, val, key, obj) {}
```

- `initialValue` - First value for the accumulator
- `obj` Object to be reduced

**Returns:** The accumulated value

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/reduce-obj.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/reduce-obj
[git-image]: https://img.shields.io/github/tag/micro-js/reduce-obj.svg
[git-url]: https://github.com/micro-js/reduce-obj
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/reduce-obj.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/reduce-obj

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