# keyfac

> Declare cache key generator

Latest version **0.1.0** (published 2017-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install keyfac
pnpm add keyfac
yarn add keyfac
bun add keyfac
```

## 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.0 |
| Published | 2017-10-14 |
| First published | 2017-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pine Mizune |
| Maintainers | pine613 |

## Links

- npm: https://www.npmjs.com/package/keyfac
- Repository: https://github.com/pine/keyfac
- Issues: https://github.com/pine/keyfac/issues
- npm.io page: https://npm.io/package/keyfac

## Dependencies (1)

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

## Recent versions

- 0.1.0 (latest) — 2017-10-14

## README

keyfac
------

[![NPM](https://nodei.co/npm/keyfac.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/keyfac/)

[![npm](https://img.shields.io/npm/v/keyfac.svg)](https://www.npmjs.org/package/keyfac)
[![Build Status](https://travis-ci.org/pine/keyfac.svg?branch=master)](https://travis-ci.org/pine/keyfac)
[![Build status](https://ci.appveyor.com/api/projects/status/d8r804nxa3chewt8/branch/master?svg=true)](https://ci.appveyor.com/project/pine/keyfac/branch/master)
[![Dependency Status](https://img.shields.io/david/pine/keyfac.svg)](https://david-dm.org/pine/keyfac)
[![devDependency Status](https://img.shields.io/david/dev/pine/keyfac.svg)](https://david-dm.org/pine/keyfac#info=devDependencies)

:key: Declare cache key generator inspired by [Cache::Keys::DSL](https://github.com/karupanerura/Cache-Keys-DSL).

## Requirements

- Node v4 or later

## Getting started

```
$ yarn add keyfac
```

or

```
$ npm install --save keyfac
```

## Usage

```javascript
const { key, keygen } = requure('keyfac')

// Simple key
const userCountKey = key('user_count')
console.log(userCountKey) // => key_for_user_count

// Key with User ID
const userNameKey = keygen('user_name')
console.log(userNameKey(1)) // => gen_key_for_user_name_1
```

See also [test.js](test.js).

## References
### `key(... items)`
Create simple key.

### `keygen(... items)`
Create key generator function with base arguments.

## License
MIT &copy; Pine Mizune

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