# string-reduce

> Reduce a string to a value

Latest version **1.0.0** (published 2017-02-16) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2017-02-16 |
| First published | 2017-02-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | tjmehta |

## Links

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

## Dependencies (1)

- [assert-err](https://npm.io/package/assert-err.md) ^1.1.0

## Recent versions

- 1.0.0 (latest) — 2017-02-16

## README

# string-reduce [![Build Status](https://travis-ci.org/tjmehta/string-reduce.svg?branch=master)](https://travis-ci.org/tjmehta/string-reduce)
Reduce a string to a value

# Installation
```bash
npm i --save string-reduce
```

# Usage
```js
var reduce = require('string-reduce')

var sum = reduce('yolo', (sum, char) => {
  return sum + character.charCodeAt()
}, 0)
// sum: 451

var expectedSum = 0 +    
  'y'.charCodeAt(0) + // 121
  'o'.charCodeAt(0) + // 111
  'l'.charCodeAt(0) + // 108
  'o'.charCodeAt(0)   // 111
// expectedSum: 451
```

# License
MIT

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