# sum-component

> Sum utility

Latest version **0.1.1** (published 2012-11-21) · 0 weekly downloads

## Install

```sh
npm install sum-component
pnpm add sum-component
yarn add sum-component
bun add sum-component
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2012-11-21 |
| First published | 2012-09-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tjholowaychuk |

## Links

- npm: https://www.npmjs.com/package/sum-component
- npm.io page: https://npm.io/package/sum-component

## Dependencies (1)

- [to-function](https://npm.io/package/to-function.md) *

## Recent versions

- 0.1.1 (latest) — 2012-11-21
- 0.1.0 — 2012-11-21
- 0.0.1 — 2012-09-20

## README

# sum

  Sum utility

## Installation

    $ component install component/sum

## API

### sum(array, [fn|string])

  Sum an array of numbers:

```js
sum([1,2,3,4,5]);
```

  Sum properties with callback:

```js
var sum = sum(users, function(user){
  return user.age;
});
```

### map(array, string)

  Sum properties in `string`:

```js
sum(users, 'age');
sum(repos, 'stats.watchers');
```

# License

  MIT

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