# reduce-keys

> Get Refile URL from key using SHA.

Latest version **0.1.5** (published 2017-02-28) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2017-02-28 |
| First published | 2017-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @evanxsummers |
| Maintainers | evanx |

## Links

- npm: https://www.npmjs.com/package/reduce-keys
- Repository: https://github.com/evanx/reduce-keys
- Issues: https://github.com/evanx/reduce-keys/issues
- npm.io page: https://npm.io/package/reduce-keys

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [app-bin](https://npm.io/package/app-bin.md) ^0.1.3

## Recent versions

- 0.1.5 (latest) — 2017-02-28
- 0.1.4 — 2017-02-27
- 0.1.3 — 2017-02-27
- 0.1.2 — 2017-02-27
- 0.1.1 — 2017-02-27

## README

# reduce-keys


### Implementation

See https://github.com/evanx/reduce-keys/blob/master/index.js

```javascript
module.exports = (keys, fn, defaultObject = {}) => keys.reduce((object, key) => {
    object[key] = fn(key);
    return object;
}, defaultObject);
```

### Test

See https://github.com/evanx/reduce-keys/blob/master/test.js
```javascript
const reduceKeys = require('./index.js');
const result = reduceKeys(['a', 'b'], key => 'c');
const expectedResult = { a: 'c', b: 'c' };
console.log({result});
if (JSON.stringify(result) !== JSON.stringify(expectedResult)) {
    throw new Error('FAIL');
}
console.log('PASS');
```

<hr>

https://twitter.com/@evanxsummers

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